iio: adc: vf610_adc: add helper function to read samples
authorNuno Sá <nuno.sa@analog.com>
Tue, 4 Oct 2022 13:49:02 +0000 (15:49 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 23 Nov 2022 19:43:58 +0000 (19:43 +0000)
commitf2bdea865e776b571557035eac2e8afde8ea7844
tree3c0c43ad67200aa71d6667df18ec7410bbafa239
parent8433aa3591afff6f4dc641a2e274e6171f66a4b7
iio: adc: vf610_adc: add helper function to read samples

This is a precursor change to make it simpler to remove the 'mlock'
usage. Having the code in it's own helper function, also makes it easier
to read the error paths.

Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Link: https://lore.kernel.org/r/20221004134909.1692021-10-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/vf610_adc.c