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>
This commit is contained in:
Stefan Popa 2018-12-13 14:46:16 +02:00 • committed by Jonathan Cameron
commit c0683bfd37
4 changed files with 21 additions and 51 deletions