]> 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)
commit0821ceb3599d78a59a5d5199fe7d321b25a634b9
treeb235c18022241e72bad6459ad56c309a1b78f12e
parent1319a2d8e84aa64c56bd24b66894c55b28840d3f
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