iio: adc: ti-ads1015: use devm_iio_triggered_buffer_setup
authorAkinobu Mita <akinobu.mita@gmail.com>
Thu, 20 Jul 2017 15:24:25 +0000 (00:24 +0900)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 20 Aug 2017 14:41:16 +0000 (15:41 +0100)
commit4de43d250672ae9f34ed4d9279235807ca4d66d3
treeba0ae32173fc3bf96cb5b3cdcd08d88fe1c90136
parent4128e8de26a354a3b595e537bfbf32c290b0b7f0
iio: adc: ti-ads1015: use devm_iio_triggered_buffer_setup

Use devm_iio_triggered_buffer_setup to simplify the error path in the
probe() and remove() function.

This changes the remove order, but the end result of remove function
actually does the reverse of probe.

Cc: Daniel Baluta <daniel.baluta@gmail.com>
Cc: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ti-ads1015.c