lkml.org 
[lkml]   [2010]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] acpi: Fix unused variable warning in sbs.c
From
 Fix unused variabled warning.

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>
---
--- linus/drivers/acpi/sbs.c 2009-12-28 12:37:29.000000000 +0600
+++ rakib/drivers/acpi/sbs.c 2010-01-03 11:29:07.000000000 +0600
@@ -822,7 +822,10 @@ static int acpi_battery_add(struct acpi_

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)

\
 
 \ /
  Last update: 2010-01-03 14:31    [from the cache]
©2003-2011 Jasper Spaans