From: Jonathan Cameron <jic23@kernel.org>
To: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
Cc: "Nuno Sá" <nuno.sa@analog.com>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"David Lechner" <dlechner@baylibre.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux@analog.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 06/13] iio: frequency: ad9523: Simplify driver a bit
Date: Wed, 24 Jun 2026 18:43:56 +0100 [thread overview]
Message-ID: <20260624184356.01c4fce4@jic23-huawei> (raw)
In-Reply-To: <620a617c03cc084a260c3441b8c9c6eed33efe0e.1781883685.git.u.kleine-koenig@baylibre.com>
On Fri, 19 Jun 2026 17:54:34 +0200
Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> wrote:
> spi driver data is only set but never used, so the assignment can be
> dropped. Also the spi id_table's .driver_data is unused and can be
> dropped.
>
> While touching the spi id_table modify it to use a named initializer.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Whilst you are here I think it makes sense to at least set the
appropriate leg of:
indio_dev->name = (pdata->name[0] != 0) ? pdata->name :
spi_get_device_id(spi)->name;
to the name string directly rather than via the spi_device_id.
Maybe that's a job for someone who is ripping out the all the pdata in favour of
a device tree binding. Ok I've argued myself into picking this up as it stands
on basis that change probably fits better in a separate rather more complex
series.
ADI people, is this one on your list to either modernize, or potentially drop?
In mean time I've applied this.
Thanks,
Jonathan
> ---
> drivers/iio/frequency/ad9523.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/iio/frequency/ad9523.c b/drivers/iio/frequency/ad9523.c
> index ea4d2763564a..1e393f40a8c8 100644
> --- a/drivers/iio/frequency/ad9523.c
> +++ b/drivers/iio/frequency/ad9523.c
> @@ -990,7 +990,6 @@ static int ad9523_probe(struct spi_device *spi)
> if (IS_ERR(st->sync_gpio))
> return PTR_ERR(st->sync_gpio);
>
> - spi_set_drvdata(spi, indio_dev);
> st->spi = spi;
> st->pdata = pdata;
>
> @@ -1009,7 +1008,7 @@ static int ad9523_probe(struct spi_device *spi)
> }
>
> static const struct spi_device_id ad9523_id[] = {
> - {"ad9523-1", 9523},
> + { .name = "ad9523-1" },
> { }
> };
> MODULE_DEVICE_TABLE(spi, ad9523_id);
next prev parent reply other threads:[~2026-06-24 17:44 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-19 15:54 [PATCH v1 00/13] iio: Use named initializers for device_id structures Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 01/13] iio: Initialize i2c_device_id arrays using member names (part 2) Uwe Kleine-König (The Capable Hub)
2026-06-24 17:34 ` Jonathan Cameron
2026-06-19 15:54 ` [PATCH v1 02/13] iio: adc: ti-tsc2046: Simplify device abstraction Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 03/13] iio: adc: ti-tsc2046: Drop unused member from private data Uwe Kleine-König (The Capable Hub)
2026-06-22 10:30 ` Andy Shevchenko
2026-06-22 13:32 ` Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 04/13] iio: adc: max1241: Simplify device abstraction Uwe Kleine-König (The Capable Hub)
2026-06-24 17:37 ` Jonathan Cameron
2026-06-19 15:54 ` [PATCH v1 05/13] iio: dac: max5522: " Uwe Kleine-König (The Capable Hub)
2026-06-24 17:38 ` Jonathan Cameron
2026-06-19 15:54 ` [PATCH v1 06/13] iio: frequency: ad9523: Simplify driver a bit Uwe Kleine-König (The Capable Hub)
2026-06-24 17:43 ` Jonathan Cameron [this message]
2026-06-19 15:54 ` [PATCH v1 07/13] iio: imu: adis16550: Simplify device abstraction Uwe Kleine-König (The Capable Hub)
2026-06-24 17:47 ` Jonathan Cameron
2026-06-19 15:54 ` [PATCH v1 08/13] iio: magnetometer: hmc5843: " Uwe Kleine-König (The Capable Hub)
2026-06-24 17:48 ` Jonathan Cameron
2026-06-19 15:54 ` [PATCH v1 09/13] iio: accel: bmc150: Explicitly set spi .driver_data Uwe Kleine-König (The Capable Hub)
2026-06-24 17:50 ` Jonathan Cameron
2026-06-19 15:54 ` [PATCH v1 10/13] iio: Drop unused assignment of spi_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 11/13] iio: Initialize spi_device_id arrays using member names Uwe Kleine-König (The Capable Hub)
2026-06-19 20:19 ` Linus Walleij
2026-06-24 17:52 ` Jonathan Cameron
2026-06-19 15:54 ` [PATCH v1 12/13] staging: iio: Drop unused assignment of spi_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-06-19 15:54 ` [PATCH v1 13/13] staging: iio: Initialize spi_device_id arrays using member names Uwe Kleine-König (The Capable Hub)
2026-06-24 17:54 ` Jonathan Cameron
2026-06-26 13:18 ` Uwe Kleine-König (The Capable Hub)
2026-06-22 11:43 ` [PATCH v1 00/13] iio: Use named initializers for device_id structures Nuno Sá
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260624184356.01c4fce4@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=nuno.sa@analog.com \
--cc=u.kleine-koenig@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox