[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aKxo87Pey5nzlP5G@smile.fi.intel.com>
Date: Mon, 25 Aug 2025 16:45:23 +0300
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Ioana Risteiu <Ioana.Risteiu@...log.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Ramona Nechita <ramona.nechita@...log.com>,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 3/4] iio: adc: extract setup function without backend
On Mon, Aug 25, 2025 at 01:51:18PM +0300, Ioana Risteiu wrote:
> Refactor probe function by moving the initialization specific to
> communication without iio-backend into a separate setup function.
>
> The purpose of this modification is better code organization. No
> functional changes intended.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...el.com>
But there is a nit-pick.
...
> indio_dev->name = st->chip_info->name;
> - indio_dev->info = &ad7779_info;
> indio_dev->modes = INDIO_DIRECT_MODE;
> - indio_dev->channels = st->chip_info->channels;
> indio_dev->num_channels = ARRAY_SIZE(ad7779_channels);
Hmm... Not sure about this split, as I would definitely keep logically coupled
things together, like channels and num_channels. Otherwise it will be harder
to maintain and more prone to subtle mistakes.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists