summaryrefslogtreecommitdiffstats
path: root/drivers/iio/gyro/fxas21002c_i2c.c
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2022-09-25 17:57:17 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-11-23 20:44:00 +0100
commit02e082c433c65f06f4cb359688993377c1d7b6d1 (patch)
tree136a8476f96e6705b9c7c192f0b4f1949d0a063c /drivers/iio/gyro/fxas21002c_i2c.c
parentiio: accel: fxls8962af: Use new EXPORT_NS_GPL_DEV_PM_OPS() (diff)
downloadlinux-02e082c433c65f06f4cb359688993377c1d7b6d1.tar.xz
linux-02e082c433c65f06f4cb359688993377c1d7b6d1.zip
iio: gyro: fxas210002c: Move exports to IIO_FXAS210002C namespace.
Includes using EXPORT_NS_GPL_DEV_PM_OPS() and the simplifications that brings by allowing the compiler to remove unused struct dev_pm_ops and callbacks without needing explicit __maybe_unused markings. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Cc: Rui Miguel Silva <rui.silva@linaro.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> -- Dropped Rui's tag on basis this is rather different from v1 due to the different macro implementation. v2: Switch to Paul's more flexible approach to EXPORT_NS_GPL_DEV_PM_OPS() Acked-by: Rui Miguel Silva <rui.silva@linaro.org> Link: https://lore.kernel.org/r/20220925155719.3316280-4-jic23@kernel.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/gyro/fxas21002c_i2c.c')
-rw-r--r--drivers/iio/gyro/fxas21002c_i2c.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/gyro/fxas21002c_i2c.c b/drivers/iio/gyro/fxas21002c_i2c.c
index 13bb52c594d1..9e2d0f34a672 100644
--- a/drivers/iio/gyro/fxas21002c_i2c.c
+++ b/drivers/iio/gyro/fxas21002c_i2c.c
@@ -53,7 +53,7 @@ MODULE_DEVICE_TABLE(of, fxas21002c_i2c_of_match);
static struct i2c_driver fxas21002c_i2c_driver = {
.driver = {
.name = "fxas21002c_i2c",
- .pm = &fxas21002c_pm_ops,
+ .pm = pm_ptr(&fxas21002c_pm_ops),
.of_match_table = fxas21002c_i2c_of_match,
},
.probe_new = fxas21002c_i2c_probe,
@@ -65,3 +65,4 @@ module_i2c_driver(fxas21002c_i2c_driver);
MODULE_AUTHOR("Rui Miguel Silva <rui.silva@linaro.org>");
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("FXAS21002C I2C Gyro driver");
+MODULE_IMPORT_NS(IIO_FXAS21002C);