.driver = {
.name = "adt7316",
.of_match_table = adt7316_of_match,
- .pm = ADT7316_PM_OPS,
+ .pm = pm_sleep_ptr(&adt7316_pm_ops),
},
.probe = adt7316_i2c_probe,
.id_table = adt7316_i2c_id,
.driver = {
.name = "adt7316",
.of_match_table = adt7316_of_spi_match,
- .pm = ADT7316_PM_OPS,
+ .pm = pm_sleep_ptr(&adt7316_pm_ops),
},
.probe = adt7316_spi_probe,
.id_table = adt7316_spi_id,
.name = "events",
};
-#ifdef CONFIG_PM_SLEEP
static int adt7316_disable(struct device *dev)
{
struct iio_dev *dev_info = dev_get_drvdata(dev);
return _adt7316_store_enabled(chip, 1);
}
-EXPORT_SYMBOL_GPL(adt7316_pm_ops);
-SIMPLE_DEV_PM_OPS(adt7316_pm_ops, adt7316_disable, adt7316_enable);
-#endif
+
+EXPORT_GPL_SIMPLE_DEV_PM_OPS(adt7316_pm_ops, adt7316_disable, adt7316_enable);
static const struct iio_info adt7316_info = {
.attrs = &adt7316_attribute_group,
int (*multi_write)(void *client, u8 first_reg, u8 count, u8 *data);
};
-#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);