summaryrefslogtreecommitdiff
path: root/drivers/iio/light
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-11-28 22:31:35 +0100
committerArnd Bergmann <arnd@arndb.de>2014-11-28 22:31:35 +0100
commitd60f5198ecfa9ed47e28fe9d416d5e9bcc662aca (patch)
tree4d3a4f61c6b27b5f61ca93a7e5ebbd7c8b8cf873 /drivers/iio/light
parentf9cda64aa83b324953b11e2ca0a5b5c72a98a72e (diff)
parent206c5f60a3d902bc4b56dab2de3e88de5eb06108 (diff)
Merge tag 'v3.18-rc4' into next/dt2
Linux 3.18-rc4 is a dependency for the phy-dt-header branch that is needed for the final mvebu DT changes. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/iio/light')
-rw-r--r--drivers/iio/light/tsl4531.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/iio/light/tsl4531.c b/drivers/iio/light/tsl4531.c
index a15006efa137..0763b8632573 100644
--- a/drivers/iio/light/tsl4531.c
+++ b/drivers/iio/light/tsl4531.c
@@ -230,9 +230,12 @@ static int tsl4531_resume(struct device *dev)
return i2c_smbus_write_byte_data(to_i2c_client(dev), TSL4531_CONTROL,
TSL4531_MODE_NORMAL);
}
-#endif
static SIMPLE_DEV_PM_OPS(tsl4531_pm_ops, tsl4531_suspend, tsl4531_resume);
+#define TSL4531_PM_OPS (&tsl4531_pm_ops)
+#else
+#define TSL4531_PM_OPS NULL
+#endif
static const struct i2c_device_id tsl4531_id[] = {
{ "tsl4531", 0 },
@@ -243,7 +246,7 @@ MODULE_DEVICE_TABLE(i2c, tsl4531_id);
static struct i2c_driver tsl4531_driver = {
.driver = {
.name = TSL4531_DRV_NAME,
- .pm = &tsl4531_pm_ops,
+ .pm = TSL4531_PM_OPS,
.owner = THIS_MODULE,
},
.probe = tsl4531_probe,