[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <add0b8de5452d9cb293c175c60cbb71b5ccac2d0.camel@gmail.com>
Date: Wed, 17 Sep 2025 16:17:56 +0100
From: Nuno Sá <noname.nuno@...il.com>
To: David Lechner <dlechner@...libre.com>, Michael Hennerich
<Michael.Hennerich@...log.com>, Jonathan Cameron <jic23@...nel.org>, Nuno
Sá
<nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: adc: ad7124: use AD7124_MAX_CHANNELS
On Wed, 2025-09-17 at 09:17 -0500, David Lechner wrote:
> 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@...libre.com>
> ---
Reviewed-by: Nuno Sá <nuno.sa@...log.com>
> 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
> c24f3d5127cb83eeab0cf37882446fc994173274..9ace3e0914f5acab695c0382df758f56f333
> ae72 100644
> --- a/drivers/iio/adc/ad7124.c
> +++ b/drivers/iio/adc/ad7124.c
> @@ -702,7 +702,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;
>
> ---
> base-commit: 561285d048053fec8a3d6d1e3ddc60df11c393a0
> change-id: 20250917-iio-adc-ad7124-use-ad7124_max_channels-37e2537d7446
>
> Best regards,
Powered by blists - more mailing lists