summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/addac/adt7316.h
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2012-02-20 18:37:05 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-24 20:11:13 (GMT)
commit01788c533acbd63702146a2be975ae4007cfb2cf (patch)
tree06af3b838bb42e46ad124c1841398c5113f455ae /drivers/staging/iio/addac/adt7316.h
parent4eeb3335bbfb4e9d6a7995f283deeecb06e07aea (diff)
downloadlinux-fsl-qoriq-01788c533acbd63702146a2be975ae4007cfb2cf.tar.xz
staging:iio: Use dev_pm_ops
Use dev_pm_ops instead of legacy suspend/resume callbacks for IIO drivers. Note that this patch introduces a few new #ifdef CONFIG_PM_SLEEP around the suspend and resume callbacks to avoid warnings of unused functions if CONFIG_PM_SLEEP is not defined. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/iio/addac/adt7316.h')
-rw-r--r--drivers/staging/iio/addac/adt7316.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/iio/addac/adt7316.h b/drivers/staging/iio/addac/adt7316.h
index d34bd67..4d3efff 100644
--- a/drivers/staging/iio/addac/adt7316.h
+++ b/drivers/staging/iio/addac/adt7316.h
@@ -10,6 +10,7 @@
#define _ADT7316_H_
#include <linux/types.h>
+#include <linux/pm.h>
#define ADT7316_REG_MAX_ADDR 0x3F
@@ -23,9 +24,11 @@ struct adt7316_bus {
int (*multi_write) (void *client, u8 first_reg, u8 count, u8 *data);
};
-#ifdef CONFIG_PM
-int adt7316_disable(struct device *dev);
-int adt7316_enable(struct device *dev);
+#ifdef CONFIG_PM_SLEEP
+extern const struct dev_pm_ops adt7316_pm_ops;
+#define ADT7316_PM_OPS (&adt7316_pm_ops)
+#else
+#define ADT7316_PM_OPS NULL
#endif
int adt7316_probe(struct device *dev, struct adt7316_bus *bus, const char *name);
int adt7316_remove(struct device *dev);