iio: st_sensors: remove all driver remove functions
authorAlexandru Ardelean <aardelean@deviqon.com>
Mon, 23 Aug 2021 11:22:03 +0000 (14:22 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 14 Sep 2021 11:00:31 +0000 (12:00 +0100)
commit6b658c31bb6bc033f6ae60141c676383fb78784c
treefeac0d86c7a3e18a3c2dda835ce97829f6ed19aa
parent5363c6c17b1014f696bf0b2984af4b694062ce8f
iio: st_sensors: remove all driver remove functions

At this point all ST driver remove functions do iio_device_unregister().
This change removes them from them and replaces all iio_device_register()
with devm_iio_device_register().

This can be done in a single change relatively easy, since all these remove
functions are define in st_sensors.h.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210823112204.243255-5-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
17 files changed:
drivers/iio/accel/st_accel_core.c
drivers/iio/accel/st_accel_i2c.c
drivers/iio/accel/st_accel_spi.c
drivers/iio/gyro/st_gyro_core.c
drivers/iio/gyro/st_gyro_i2c.c
drivers/iio/gyro/st_gyro_spi.c
drivers/iio/imu/st_lsm9ds0/st_lsm9ds0.h
drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c
drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c
drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c
drivers/iio/magnetometer/st_magn_core.c
drivers/iio/magnetometer/st_magn_i2c.c
drivers/iio/magnetometer/st_magn_spi.c
drivers/iio/pressure/st_pressure_core.c
drivers/iio/pressure/st_pressure_i2c.c
drivers/iio/pressure/st_pressure_spi.c
include/linux/iio/common/st_sensors.h