ACPI: Fix unused variable warning in sbs.c
authorRakib Mullick <[email protected]>
Sun, 3 Jan 2010 13:27:56 +0000 (19:27 +0600)
committerLen Brown <[email protected]>
Sat, 16 Jan 2010 21:04:18 +0000 (16:04 -0500)
When CONFIG_ACPI_SYSFS_POWER=n and CONFIG_ACPI_PROCFS_POWER=n, then
we're warned by the following warning:

drivers/acpi/sbs.c: In function `acpi_battery_remove':
drivers/acpi/sbs.c:825: warning: unused variable `battery'

Signed-off-by: Rakib Mullick <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Len Brown <[email protected]>
drivers/acpi/sbs.c

index 52b9db8afc20296ba11ec32ec7a10f5041f653dc..b16ddbf23a9c71115aba72e07959889a0e0958df 100644 (file)
@@ -822,7 +822,10 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
 
 static void acpi_battery_remove(struct acpi_sbs *sbs, int id)
 {
+#if defined(CONFIG_ACPI_SYSFS_POWER) || defined(CONFIG_ACPI_PROCFS_POWER)
        struct acpi_battery *battery = &sbs->battery[id];
+#endif
+
 #ifdef CONFIG_ACPI_SYSFS_POWER
        if (battery->bat.dev) {
                if (battery->have_sysfs_alarm)