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>2012-05-22 10:59:54 +0200
commit7bc7ab720fbad4393ad7452dcb3ecc1008c3cc37 (patch)
treefa1f58ce075cf4d95d48f391e89881325e7b6af6
parent2069fe587096c7cdaea8aa6bc6022fd41a9a9d53 (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 95aee44e30f..7eb13d1085c 100644
--- a/drivers/misc/bh1780gli.c
+++ b/drivers/misc/bh1780gli.c
@@ -244,6 +244,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;
@@ -284,7 +285,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);
@@ -313,6 +317,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)
@@ -338,7 +343,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 },