Input: lm8323 - wrap suspend and resume in CONFIG_PM_SLEEP
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 6 Oct 2011 22:26:52 +0000 (15:26 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 7 Oct 2011 02:43:09 +0000 (19:43 -0700)
CONFIG_PM is defined when CONFIG_PM_SLEEP or CONFIG_PM_RUNTIME is defined,
however suspend and resume methods are only valid in the context of
CONFIG_PM_SLEEP. If only CONFIG_PM_RUNTIME is defined we get the following
warning (courtesy of Geerts randconfig builds):

lm8323.c: warning: 'lm8323_resume' defined but not used

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/keyboard/lm8323.c

index 756348a..82d1dc8 100644 (file)
@@ -788,7 +788,7 @@ static int __devexit lm8323_remove(struct i2c_client *client)
        return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 /*
  * We don't need to explicitly suspend the chip, as it already switches off
  * when there's no activity.