diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-10-06 18:26:52 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-10-06 22:43:05 -0400 |
commit | d4f4158dcda2f75ba8024e540d0bba070af1e67a (patch) | |
tree | 2c767579521728a94f8624b43a96cbfa526f7685 | |
parent | 26e56eb2bfccdd6bcec0c298d40e12e3daea0188 (diff) |
Input: ad7879-i2c - wrap suspend and resume in CONFIG_PM_SLEEP
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):
ad7879-i2c.c: warning: 'ad7879_i2c_resume' defined but not used
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r-- | drivers/input/touchscreen/ad7879-i2c.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/ad7879-i2c.c b/drivers/input/touchscreen/ad7879-i2c.c index 4e4e58cec6c..c789b974c79 100644 --- a/drivers/input/touchscreen/ad7879-i2c.c +++ b/drivers/input/touchscreen/ad7879-i2c.c | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #define AD7879_DEVID 0x79 /* AD7879-1/AD7889-1 */ | 17 | #define AD7879_DEVID 0x79 /* AD7879-1/AD7889-1 */ |
18 | 18 | ||
19 | #ifdef CONFIG_PM | 19 | #ifdef CONFIG_PM_SLEEP |
20 | static int ad7879_i2c_suspend(struct device *dev) | 20 | static int ad7879_i2c_suspend(struct device *dev) |
21 | { | 21 | { |
22 | struct i2c_client *client = to_i2c_client(dev); | 22 | struct i2c_client *client = to_i2c_client(dev); |
@@ -36,9 +36,9 @@ static int ad7879_i2c_resume(struct device *dev) | |||
36 | 36 | ||
37 | return 0; | 37 | return 0; |
38 | } | 38 | } |
39 | #endif | ||
39 | 40 | ||
40 | static SIMPLE_DEV_PM_OPS(ad7879_i2c_pm, ad7879_i2c_suspend, ad7879_i2c_resume); | 41 | static SIMPLE_DEV_PM_OPS(ad7879_i2c_pm, ad7879_i2c_suspend, ad7879_i2c_resume); |
41 | #endif | ||
42 | 42 | ||
43 | /* All registers are word-sized. | 43 | /* All registers are word-sized. |
44 | * AD7879 uses a high-byte first convention. | 44 | * AD7879 uses a high-byte first convention. |
@@ -119,9 +119,7 @@ static struct i2c_driver ad7879_i2c_driver = { | |||
119 | .driver = { | 119 | .driver = { |
120 | .name = "ad7879", | 120 | .name = "ad7879", |
121 | .owner = THIS_MODULE, | 121 | .owner = THIS_MODULE, |
122 | #ifdef CONFIG_PM | ||
123 | .pm = &ad7879_i2c_pm, | 122 | .pm = &ad7879_i2c_pm, |
124 | #endif | ||
125 | }, | 123 | }, |
126 | .probe = ad7879_i2c_probe, | 124 | .probe = ad7879_i2c_probe, |
127 | .remove = __devexit_p(ad7879_i2c_remove), | 125 | .remove = __devexit_p(ad7879_i2c_remove), |