* [PATCH] iio: adc: ad7124: use AD7124_MAX_CHANNELS
@ 2025-09-17 14:17 David Lechner
2025-09-17 15:17 ` Nuno Sá
0 siblings, 1 reply; 3+ messages in thread
From: David Lechner @ 2025-09-17 14:17 UTC (permalink / raw)
To: Michael Hennerich, Jonathan Cameron, Nuno Sá,
Andy Shevchenko
Cc: linux-iio, linux-kernel, David Lechner
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>
---
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..9ace3e0914f5acab695c0382df758f56f333ae72 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,
--
David Lechner <dlechner@baylibre.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: adc: ad7124: use AD7124_MAX_CHANNELS
2025-09-17 14:17 [PATCH] iio: adc: ad7124: use AD7124_MAX_CHANNELS David Lechner
@ 2025-09-17 15:17 ` Nuno Sá
2025-09-20 11:04 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Nuno Sá @ 2025-09-17 15:17 UTC (permalink / raw)
To: David Lechner, Michael Hennerich, Jonathan Cameron, Nuno Sá,
Andy Shevchenko
Cc: linux-iio, linux-kernel
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@baylibre.com>
> ---
Reviewed-by: Nuno Sá <nuno.sa@analog.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,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: adc: ad7124: use AD7124_MAX_CHANNELS
2025-09-17 15:17 ` Nuno Sá
@ 2025-09-20 11:04 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2025-09-20 11:04 UTC (permalink / raw)
To: Nuno Sá
Cc: David Lechner, Michael Hennerich, Nuno Sá, Andy Shevchenko,
linux-iio, linux-kernel
On Wed, 17 Sep 2025 16:17:56 +0100
Nuno Sá <noname.nuno@gmail.com> wrote:
> 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@baylibre.com>
> > ---
>
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Applied to iio.git/testing
Thanks,
Jonathan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-20 11:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-17 14:17 [PATCH] iio: adc: ad7124: use AD7124_MAX_CHANNELS David Lechner
2025-09-17 15:17 ` Nuno Sá
2025-09-20 11:04 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox