diff options
author | Jonas Aaberg <jonas.aberg@stericsson.com> | 2011-05-24 11:44:33 +0200 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:06:06 +0200 |
commit | 413c02ff697be07b5ac955c780d870e2f69c9250 (patch) | |
tree | b07fcc6474850d2f8af4086c603c47c5e43a1793 | |
parent | 84b47ea1b23440dbcc9fcc824812d882b093e64f (diff) |
hwmon: lsm303dlh_a: Fix ifdefs
ST-Ericsson Linux next: Not tested, ask SSM for ER
ST-Ericsson ID: -
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: Ia2cdb2cde8f0baffe5b8f5847754780068153d9e
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23697
-rw-r--r-- | drivers/hwmon/lsm303dlh_a.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/hwmon/lsm303dlh_a.c b/drivers/hwmon/lsm303dlh_a.c index 1436e77a0d6..678f35a7730 100644 --- a/drivers/hwmon/lsm303dlh_a.c +++ b/drivers/hwmon/lsm303dlh_a.c @@ -226,6 +226,7 @@ static int lsm303dlh_a_read(struct lsm303dlh_a_data *ddata, u8 reg, char *msg) return ret; } +#if defined(CONFIG_HAS_EARLYSUSPEND) || defined(CONFIG_PM) static int lsm303dlh_a_do_suspend(struct lsm303dlh_a_data *ddata) { int ret; @@ -354,7 +355,7 @@ fail: mutex_unlock(&ddata->lock); return ret; } - +#endif static int lsm303dlh_a_readdata(struct lsm303dlh_a_data *ddata) { @@ -1236,7 +1237,8 @@ static int __devexit lsm303dlh_a_remove(struct i2c_client *client) return 0; } -#if (!defined(CONFIG_HAS_EARLYSUSPEND) && defined(CONFIG_PM)) +#ifndef CONFIG_HAS_EARLYSUSPEND +#ifdef CONFIG_PM static int lsm303dlh_a_suspend(struct device *dev) { struct lsm303dlh_a_data *ddata; @@ -1268,6 +1270,7 @@ static const struct dev_pm_ops lsm303dlh_a_dev_pm_ops = { .suspend = lsm303dlh_a_suspend, .resume = lsm303dlh_a_resume, }; +#endif #else static void lsm303dlh_a_early_suspend(struct early_suspend *data) { |