summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Aaberg <jonas.aberg@stericsson.com>2011-05-24 11:46:28 +0200
committerPhilippe Langlais <philippe.langlais@stericsson.com>2011-12-06 10:50:18 +0100
commit40a31b5fc8795ed0b75fee482b9f77c452e78783 (patch)
tree8434f539bbb23e7ea7062866f0b66172b47c56b0
parented5320abf75fc23a6506cd96af73649fa1e755a0 (diff)
misc: bh1780gli.c: Fix ifdefs
ST-Ericsson Linux next: Not tested, ask SSM for ER ST-Ericsson ID: - ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ie68a18f1120899167026b8b5116dd14c658d2d1d Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23701 Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com> Reviewed-by: QATEST Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/28974 Tested-by: Naga RADHESH Y <naga.radheshy@stericsson.com> Reviewed-by: Bibek BASU <bibek.basu@stericsson.com> Tested-by: Bibek BASU <bibek.basu@stericsson.com>
-rw-r--r--drivers/misc/bh1780gli.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/misc/bh1780gli.c b/drivers/misc/bh1780gli.c
index c49d45fa236..060441599cb 100644
--- a/drivers/misc/bh1780gli.c
+++ b/drivers/misc/bh1780gli.c
@@ -243,6 +243,7 @@ static int __devexit bh1780_remove(struct i2c_client *client)
return 0;
}
+#if defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_PM)
static int bh1780_do_suspend(struct bh1780_data *ddata)
{
int ret = 0;
@@ -283,7 +284,10 @@ unlock:
mutex_unlock(&ddata->lock);
return ret;
}
-#if (!defined(CONFIG_HAS_EARLYSUSPEND) && defined(CONFIG_PM))
+#endif
+
+#ifndef CONFIG_HAS_EARLYSUSPEND
+#ifdef CONFIG_PM
static int bh1780_suspend(struct device *dev)
{
struct bh1780_data *ddata = dev_get_drvdata(dev);
@@ -312,6 +316,7 @@ static int bh1780_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(bh1780_pm, bh1780_suspend, bh1780_resume);
#define BH1780_PMOPS (&bh1780_pm)
+#endif /* CONFIG_PM */
#else
#define BH1780_PMOPS NULL
static void bh1780_early_suspend(struct early_suspend *data)
@@ -337,7 +342,7 @@ static void bh1780_late_resume(struct early_suspend *data)
dev_err(&ddata->client->dev,
"Error while resuming the device\n");
}
-#endif /*!CONFIG_HAS_EARLYSUSPEND && CONFIG_PM */
+#endif /*!CONFIG_HAS_EARLYSUSPEND */
static const struct i2c_device_id bh1780_id[] = {
{ "bh1780", 0 },