[PATCH RFC] drivers/misc/bh1770glc.c: Make suspend depend on CONFIG_PM_SLEEP.

From: Shubhrajyoti D
Date: Wed Jan 11 2012 - 00:37:42 EST


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@xxxxxxxxx>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@xxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/