From b8579b7c6e484f399f14bca2a9d2ca83a3c9b483 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Wed, 17 Sep 2025 09:17:23 -0500 Subject: [PATCH] iio: adc: ad7124: use AD7124_MAX_CHANNELS MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Nuno Sá Signed-off-by: Jonathan Cameron --- drivers/iio/adc/ad7124.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad7124.c b/drivers/iio/adc/ad7124.c index 950abdb75e6d4..b13a7824ae014 100644 --- a/drivers/iio/adc/ad7124.c +++ b/drivers/iio/adc/ad7124.c @@ -708,7 +708,7 @@ static int ad7124_disable_all(struct ad_sigma_delta *sd) int ret; int i; - for (i = 0; i < 16; i++) { + for (i = 0; i < AD7124_MAX_CHANNELS; i++) { ret = ad7124_disable_one(sd, i); if (ret < 0) return ret; -- 2.47.3