]> git.baikalelectronics.ru Git - kernel.git/commit
iio: adc: at91-sama5d2_adc: merge buffer & trigger init into a function
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Tue, 29 Sep 2020 12:59:42 +0000 (15:59 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 21 Nov 2020 14:53:03 +0000 (14:53 +0000)
commit03232c21d3bb7604502a697a6cce5a5401bd45f3
tree24e7179823afb3083fd253a5b23a06e3d26cc395
parent139070b338094b97124393e855a0fadaeaba3a1e
iio: adc: at91-sama5d2_adc: merge buffer & trigger init into a function

This change is mostly cosmetic, but it's also a pre-cursor to the
the change for 'iio_buffer_set_attrs()', where the helper gets updated to
better support multiple IIO buffers for 1 IIO device.

The only functional change is that the error message for the trigger alloc
failure is bound to the parent device vs the IIO device object.

Also, the new at91_adc_buffer_and_trigger_init() function was moved after
the definition of the 'at91_adc_fifo_attributes'.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200929125949.69934-3-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/at91-sama5d2_adc.c