Skip to content

Commit

Permalink
ACPI: Fix unused variable warning in sbs.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rakib Mullick authored and Len Brown committed Jan 16, 2010
1 parent c97adf9 commit c19bdb6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/acpi/sbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c19bdb6

Please sign in to comment.