iio: health: afe4404: Use devm IIO helpers
authorAndrew Davis <afd@ti.com>
Tue, 23 Jan 2024 14:09:18 +0000 (08:09 -0600)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 17 Feb 2024 16:16:10 +0000 (16:16 +0000)
commit044b432392f827f39c1523bc67a62209d2d7760e
treeb31826d0c56ff653e2c298f07e2c42fad9f08a8c
parent5ff7ea503cd40776b741a33de762cc3f71c3fc1a
iio: health: afe4404: Use devm IIO helpers

Use a device lifecycle managed IIO helper functions. This helps prevent
mistakes like unregistering and freeing out of order in cleanup functions
and forgetting to unregister and free on error paths.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20240123140918.215818-4-afd@ti.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/health/afe4404.c