staging: iio: adc: ad7606: Use devm functions in probe
authorStefan Popa <stefan.popa@analog.com>
Thu, 13 Dec 2018 12:46:16 +0000 (14:46 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 22 Dec 2018 16:58:13 +0000 (16:58 +0000)
commitc0683bfd3772337353e95decc2bf0421058088f7
tree8b3039ff8d53c8ea954a822a22970549f7686744
parent557e585c3fdba1f6cddb4516a82da53b52fd9963
staging: iio: adc: ad7606: Use devm functions in probe

Switch to devm version of request_irq, iio_triggered_buffer_setup,
iio_device_register. To avoid potential ordering issues in probe,
devm_add_action_or_reset() is used for the regulator_disable(). This
simplifies the code and decreases the chance of bugs.

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/staging/iio/adc/ad7606.c
drivers/staging/iio/adc/ad7606.h
drivers/staging/iio/adc/ad7606_par.c
drivers/staging/iio/adc/ad7606_spi.c