aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2021-11-01 21:18:47 +0000
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-11-01 21:18:47 +0000
commit2e7f7ed90d5e9d2a1fbc05a1fb0b5c089defd049 (patch)
treead351c8e73a3b20192c0a268f598e809455a3558
parent19bfb064dcd16d6c491b118720a542623f7733ed (diff)
downloadiio-iwyu-cleanups.tar.gz
iio:accel:mma9553: Switch from CONFIG_PM* guards to __maybe_unused.iio-iwyu-cleanups
Letting dead code removal clean this up for us is simpler than doing it ourselves. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--drivers/iio/accel/mma9553.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/iio/accel/mma9553.c b/drivers/iio/accel/mma9553.c
index ba3ecb3b57dcd..8fbc44903920b 100644
--- a/drivers/iio/accel/mma9553.c
+++ b/drivers/iio/accel/mma9553.c
@@ -1162,8 +1162,7 @@ static int mma9553_remove(struct i2c_client *client)
return 0;
}
-#ifdef CONFIG_PM
-static int mma9553_runtime_suspend(struct device *dev)
+static __maybe_unused int mma9553_runtime_suspend(struct device *dev)
{
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
struct mma9553_data *data = iio_priv(indio_dev);
@@ -1180,7 +1179,7 @@ static int mma9553_runtime_suspend(struct device *dev)
return 0;
}
-static int mma9553_runtime_resume(struct device *dev)
+static __maybe_unused int mma9553_runtime_resume(struct device *dev)
{
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
struct mma9553_data *data = iio_priv(indio_dev);
@@ -1194,10 +1193,8 @@ static int mma9553_runtime_resume(struct device *dev)
return 0;
}
-#endif
-#ifdef CONFIG_PM_SLEEP
-static int mma9553_suspend(struct device *dev)
+static __maybe_unused int mma9553_suspend(struct device *dev)
{
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
struct mma9553_data *data = iio_priv(indio_dev);
@@ -1210,7 +1207,7 @@ static int mma9553_suspend(struct device *dev)
return ret;
}
-static int mma9553_resume(struct device *dev)
+static __maybe_unused int mma9553_resume(struct device *dev)
{
struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
struct mma9553_data *data = iio_priv(indio_dev);
@@ -1222,7 +1219,6 @@ static int mma9553_resume(struct device *dev)
return ret;
}
-#endif
static const struct dev_pm_ops mma9553_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(mma9553_suspend, mma9553_resume)