}
EXPORT_SYMBOL(hts221_probe);
-static int __maybe_unused hts221_suspend(struct device *dev)
+static int hts221_suspend(struct device *dev)
{
struct iio_dev *iio_dev = dev_get_drvdata(dev);
struct hts221_hw *hw = iio_priv(iio_dev);
FIELD_PREP(HTS221_ENABLE_MASK, false));
}
-static int __maybe_unused hts221_resume(struct device *dev)
+static int hts221_resume(struct device *dev)
{
struct iio_dev *iio_dev = dev_get_drvdata(dev);
struct hts221_hw *hw = iio_priv(iio_dev);
return err;
}
-const struct dev_pm_ops hts221_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(hts221_suspend, hts221_resume)
-};
-EXPORT_SYMBOL(hts221_pm_ops);
+EXPORT_SIMPLE_DEV_PM_OPS(hts221_pm_ops, hts221_suspend, hts221_resume);
MODULE_AUTHOR("Lorenzo Bianconi <lorenzo.bianconi@st.com>");
MODULE_DESCRIPTION("STMicroelectronics hts221 sensor driver");
static struct i2c_driver hts221_driver = {
.driver = {
.name = "hts221_i2c",
- .pm = &hts221_pm_ops,
+ .pm = pm_sleep_ptr(&hts221_pm_ops),
.of_match_table = hts221_i2c_of_match,
.acpi_match_table = ACPI_PTR(hts221_acpi_match),
},
static struct spi_driver hts221_driver = {
.driver = {
.name = "hts221_spi",
- .pm = &hts221_pm_ops,
+ .pm = pm_sleep_ptr(&hts221_pm_ops),
.of_match_table = hts221_spi_of_match,
},
.probe = hts221_spi_probe,