summaryrefslogtreecommitdiff
path: root/drivers/hwmon/lsm303dlh_m.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/lsm303dlh_m.c')
-rw-r--r--drivers/hwmon/lsm303dlh_m.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/hwmon/lsm303dlh_m.c b/drivers/hwmon/lsm303dlh_m.c
index 98704dc5a0b..b2a6feb4538 100644
--- a/drivers/hwmon/lsm303dlh_m.c
+++ b/drivers/hwmon/lsm303dlh_m.c
@@ -39,6 +39,9 @@
#include <linux/lsm303dlh.h>
#include <linux/regulator/consumer.h>
+#ifdef CONFIG_HAS_EARLYSUSPEND
+#include <linux/earlysuspend.h>
+#endif
#include <linux/kernel.h>
/* lsm303dlh magnetometer registers */
@@ -161,6 +164,9 @@ struct lsm303dlh_m_data {
unsigned char mode;
unsigned char rate;
unsigned char range;
+#ifdef CONFIG_HAS_EARLYSUSPEND
+ struct early_suspend early_suspend;
+#endif
int device_status;
};
@@ -884,9 +890,9 @@ static struct i2c_driver lsm303dlh_m_driver = {
.id_table = lsm303dlh_m_id,
.driver = {
.name = "lsm303dlh_m",
- #if (!defined(CONFIG_HAS_EARLYSUSPEND) && defined(CONFIG_PM))
+#if (!defined(CONFIG_HAS_EARLYSUSPEND) && defined(CONFIG_PM))
.pm = &lsm303dlh_m_dev_pm_ops,
- #endif
+#endif
},
};