Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: adc: ad7124: use AD7124_MAX_CHANNELS

Use AD7124_MAX_CHANNELS macro instead of hardcoding 16 in
ad7124_disable_all(). We already have the macro, so we should use it.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

David Lechner and committed by
Jonathan Cameron
b8579b7c 4a579c17

+1 -1
+1 -1
drivers/iio/adc/ad7124.c
··· 708 708 int ret; 709 709 int i; 710 710 711 - for (i = 0; i < 16; i++) { 711 + for (i = 0; i < AD7124_MAX_CHANNELS; i++) { 712 712 ret = ad7124_disable_one(sd, i); 713 713 if (ret < 0) 714 714 return ret;