@@ -916,8 +916,7 @@ static int us5182d_remove(struct i2c_client *client)
return us5182d_shutdown_en(data, US5182D_CFG0_SHUTDOWN_EN);
}
-#if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM)
-static int us5182d_suspend(struct device *dev)
+static __maybe_unused int us5182d_suspend(struct device *dev)
{
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
struct us5182d_data *data = iio_priv(indio_dev);
@@ -928,7 +927,7 @@ static int us5182d_suspend(struct device *dev)
return 0;
}
-static int us5182d_resume(struct device *dev)
+static __maybe_unused int us5182d_resume(struct device *dev)
{
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
struct us5182d_data *data = iio_priv(indio_dev);
@@ -939,9 +938,8 @@ static int us5182d_resume(struct device *dev)
return 0;
}
-#endif
-static const struct dev_pm_ops us5182d_pm_ops = {
+static __maybe_unused const struct dev_pm_ops us5182d_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(us5182d_suspend, us5182d_resume)
SET_RUNTIME_PM_OPS(us5182d_suspend, us5182d_resume, NULL)
};
@@ -969,7 +967,7 @@ MODULE_DEVICE_TABLE(of, us5182d_of_match);
static struct i2c_driver us5182d_driver = {
.driver = {
.name = US5182D_DRV_NAME,
- .pm = &us5182d_pm_ops,
+ .pm = pm_ptr(&us5182d_pm_ops),
.of_match_table = us5182d_of_match,
.acpi_match_table = ACPI_PTR(us5182d_acpi_match),
},