iio: st_sensors: remove reference to parent device object on st_sensor_data
authorAlexandru Ardelean <aardelean@deviqon.com>
Mon, 23 Aug 2021 11:22:04 +0000 (14:22 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 14 Sep 2021 11:00:32 +0000 (12:00 +0100)
commite42696515414a15774c80f1d454194ce0cd9f145
tree136f7c4ff371ec222c287c0dcaa6370e336bc048
parent6b658c31bb6bc033f6ae60141c676383fb78784c
iio: st_sensors: remove reference to parent device object on st_sensor_data

The idea behind it, is that all devm_ calls in ST sensors are bound to the
parent device object.

However, the reference to that object is kept on both the st_sensor_data
struct and the IIO object parent (indio_dev->dev.parent).

This change only adds a bit consistency and uses the reference stored on
indio_dev->dev.parent, to enforce the assumption that all ST sensors' devm_
calls are bound to the same reference as the one store on st_sensor_data.

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-6-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/st_accel_core.c
drivers/iio/common/st_sensors/st_sensors_i2c.c
drivers/iio/common/st_sensors/st_sensors_spi.c
drivers/iio/common/st_sensors/st_sensors_trigger.c
drivers/iio/gyro/st_gyro_core.c
drivers/iio/imu/st_lsm9ds0/st_lsm9ds0_core.c
drivers/iio/magnetometer/st_magn_core.c
drivers/iio/pressure/st_pressure_core.c
include/linux/iio/common/st_sensors.h