Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a65b2b2 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Sebastian Reichel
Browse files

power: collie_battery: hide unused variable



The 'wakeup_enabled' variable in this driver is only accessed
by the optional power management functions and we get a warning
when they are disabled:

drivers/power/collie_battery.c:29:12: error: 'wakeup_enabled' defined but not used [-Werror=unused-variable]

This moves the definition next to the users inside the same #ifdef,
which avoids the warning.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent 3f652c96
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -26,7 +26,6 @@
static DEFINE_MUTEX(bat_lock); /* protects gpio pins */
static struct work_struct bat_work;
static struct ucb1x00 *ucb;
static int wakeup_enabled;

struct collie_bat {
	int status;
@@ -291,6 +290,8 @@ static struct gpio collie_batt_gpios[] = {
};

#ifdef CONFIG_PM
static int wakeup_enabled;

static int collie_bat_suspend(struct ucb1x00_dev *dev)
{
	/* flush all pending status updates */