Re: [PATCH v3 5/5] iio: st_sensors: remove reference to parent device object on st_sensor_data
From: Linus Walleij
Date: Fri Aug 27 2021 - 18:36:07 EST
On Mon, Aug 23, 2021 at 1:22 PM Alexandru Ardelean
<aardelean@xxxxxxxxxxx> wrote:
> 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@xxxxxxxxx>
> Signed-off-by: Alexandru Ardelean <aardelean@xxxxxxxxxxx>
Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
Yours,
Linus Walleij