]> git.baikalelectronics.ru Git - kernel.git/commit
iio: adc: at91-sama5d2_adc: move the check of oversampling in its function
authorClaudiu Beznea <claudiu.beznea@microchip.com>
Wed, 3 Aug 2022 10:28:43 +0000 (13:28 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 15 Aug 2022 21:29:58 +0000 (22:29 +0100)
commitcfee820b77deadf4071c4890685918c0717510cc
treeb235c18022241e72bad6459ad56c309a1b78f12e
parentbfed831b7b72b124952f28176c06be3f9af7ab16
iio: adc: at91-sama5d2_adc: move the check of oversampling in its function

Oversampling values are checked anyway in at91_adc_emr_config(). Remove
the checking of these from at91_adc_write_raw() and return -EINVAL
instead in at91_adc_emr_config().

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20220803102855.2191070-8-claudiu.beznea@microchip.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/at91-sama5d2_adc.c