Messages in this thread Patch in this message | | | From | Shubhrajyoti D <> | Subject | [PATCH RFC] drivers/misc/bh1770glc.c: Make suspend depend on CONFIG_PM_SLEEP. | Date | Wed, 11 Jan 2012 11:06:46 +0530 |
| |
SET_SYSTEM_SLEEP_PM_OPS depends CONFIG_PM_SLEEP. The patch defines the suspend and resume functions for CONFIG_PM_SLEEP instead of CONFIG_PM. Also the else part making NULL is unneeded as the macro SET_SYSTEM_SLEEP_PM_OPS takes care of it.
Also delete the bh1770_shutdown reference as it is not used.
Cc: Samu Onkalo <samu.p.onkalo@nokia.com> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> --- drivers/misc/bh1770glc.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/misc/bh1770glc.c b/drivers/misc/bh1770glc.c index d79a972..661e912 100644 --- a/drivers/misc/bh1770glc.c +++ b/drivers/misc/bh1770glc.c @@ -1310,7 +1310,7 @@ static int __devexit bh1770_remove(struct i2c_client *client) return 0; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int bh1770_suspend(struct device *dev) { struct i2c_client *client = container_of(dev, struct i2c_client, dev); @@ -1347,10 +1347,6 @@ static int bh1770_resume(struct device *dev) return ret; } -#else -#define bh1770_suspend NULL -#define bh1770_shutdown NULL -#define bh1770_resume NULL #endif #ifdef CONFIG_PM_RUNTIME -- 1.7.1
| |