staging: iio: adc: ad7606: Use find_closest() macro

When looking for the available scale or oversampling ratio, it is better
to use the find_closest() macro. This simplifies the code and also does
not require an exact value to be entered from the user space.

Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Stefan Popa 2018-12-13 14:46:18 +02:00 • committed by Jonathan Cameron
commit 41f71e5e7d