Re: [PATCH 3/4] iio: st_sensors: remove all driver remove functions

From: Andy Shevchenko
Date: Mon Jul 26 2021 - 03:20:47 EST


On Mon, Jul 26, 2021 at 10:14 AM Alexandru Ardelean
<aardelean@xxxxxxxxxxx> wrote:
>
> 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

easily

> functions are define in st_sensors.h.

defined

> drivers/iio/imu/st_lsm9ds0/st_lsm9ds0.h | 1 -
> drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c | 15 +--------------
> drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_i2c.c | 6 ------
> drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_spi.c | 6 ------

I will check these later on, but the rule of thumb about devm_*() is
that there shouldn't be gaps (non-devm) before any devm call.

--
With Best Regards,
Andy Shevchenko