summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sbs.c
diff options
context:
space:
mode:
authorRakib Mullick <rakib.mullick@gmail.com>2010-01-03 14:27:56 +0100
committerLen Brown <len.brown@intel.com>2010-01-16 22:04:18 +0100
commitc19bdb6126a5e1f43b4a4fc3c4b09c926667e5ef (patch)
treec3a8da51ed0bf5f365fe28b5fcc32fd6673012ce /drivers/acpi/sbs.c
parentacpi: make ACPI device id constant (diff)
downloadlinux-c19bdb6126a5e1f43b4a4fc3c4b09c926667e5ef.tar.xz
linux-c19bdb6126a5e1f43b4a4fc3c4b09c926667e5ef.zip
ACPI: Fix unused variable warning in sbs.c
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 <rakib.mullick@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/sbs.c')
-rw-r--r--drivers/acpi/sbs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index 52b9db8afc20..b16ddbf23a9c 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -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)