iio: adc: meson_saradc: Don't attach managed resource to IIO device object
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 3 Jun 2022 09:59:59 +0000 (12:59 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 15 Jun 2022 21:07:10 +0000 (22:07 +0100)
commitec25bb6e84a090da9c5c397c8af962dcb2e1c664
treebfb0cdebd5e3486a1405a5c672e015728a5a33cd
parent5a3ec28adafd2d1055162e52d2cb4d37a8391615
iio: adc: meson_saradc: Don't attach managed resource to IIO device object

It feels wrong and actually inconsistent to attach managed resources
to the IIO device object, which is child of the physical device object.
The rest of the ->probe() calls do that against physical device.

Resolve this by reassigning managed resources to the physical device object.

Suggested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20220603100004.70336-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/meson_saradc.c