From: Matti Vaittinen <mazziesaccount@gmail.com>
To: "Pawel Zalewski" <pzalewski@thegoodpenguin.co.uk>,
"Nuno Sá" <nuno.sa@analog.com>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Petre Rodan" <petre.rodan@subdimension.ro>,
"Matteo Martelli" <matteomartelli3@gmail.com>,
"Marius Cristea" <marius.cristea@microchip.com>,
"Lorenzo Bianconi" <lorenzo@kernel.org>,
"Alex Lanzano" <lanzano.alex@gmail.com>,
"Jagath Jog J" <jagathjog1996@gmail.com>,
"Jean-Baptiste Maneyrol" <jean-baptiste.maneyrol@tdk.com>,
"Kevin Tsai" <ktsai@capellamicro.com>,
"Eddie James" <eajames@linux.ibm.com>,
"Marcelo Schmitt" <marcelo.schmitt@analog.com>
Cc: linux@analog.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 02/12] iio: adc: use named initializers for acpi_device_id
Date: Mon, 12 Oct 2026 13:57:01 +0300 [thread overview]
Message-ID: <930d92e6-dee8-468f-8b54-bcc0bf41ae28@gmail.com> (raw)
In-Reply-To: <20261005-acpi-iio-v1-2-2796f713945a@thegoodpenguin.co.uk>
On 05/10/2026 17:01, Pawel Zalewski wrote:
> Use a designated initializer for the acpi_device_id fields which makes the
> code more readable and consistent with how lists are initialized in the
> rest of the kernel code base. Also drop explicitly setting fields to 0
> where it is redundant.
>
> Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
> ---
> drivers/iio/adc/ad7298.c | 2 +-
> drivers/iio/adc/pac1921.c | 2 +-
> drivers/iio/adc/pac1934.c | 2 +-
> drivers/iio/adc/ti-adc081c.c | 2 +-
> drivers/iio/adc/ti-adc108s102.c | 2 +-
> drivers/iio/adc/ti-adc128s052.c | 2 +-
> 6 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/iio/adc/ad7298.c b/drivers/iio/adc/ad7298.c
> index c669022b5dec..66b8ca4e3132 100644
> --- a/drivers/iio/adc/ad7298.c
> +++ b/drivers/iio/adc/ad7298.c
> @@ -347,7 +347,7 @@ static int ad7298_probe(struct spi_device *spi)
> }
>
> static const struct acpi_device_id ad7298_acpi_ids[] = {
> - { "INT3494", 0 },
> + { .id = "INT3494" },
> { }
> };
> MODULE_DEVICE_TABLE(acpi, ad7298_acpi_ids);
> diff --git a/drivers/iio/adc/pac1921.c b/drivers/iio/adc/pac1921.c
> index f0bab94462f4..730416ba147b 100644
> --- a/drivers/iio/adc/pac1921.c
> +++ b/drivers/iio/adc/pac1921.c
> @@ -1322,7 +1322,7 @@ static const struct of_device_id pac1921_of_match[] = {
> MODULE_DEVICE_TABLE(of, pac1921_of_match);
>
> static const struct acpi_device_id pac1921_acpi_match[] = {
> - { "MCHP1921" },
> + { .id = "MCHP1921" },
> { }
> };
> MODULE_DEVICE_TABLE(acpi, pac1921_acpi_match);
> diff --git a/drivers/iio/adc/pac1934.c b/drivers/iio/adc/pac1934.c
> index de59dc27c440..7e18a8728bd8 100644
> --- a/drivers/iio/adc/pac1934.c
> +++ b/drivers/iio/adc/pac1934.c
> @@ -1612,7 +1612,7 @@ MODULE_DEVICE_TABLE(of, pac1934_of_match);
> * https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ApplicationNotes/ApplicationNotes/PAC1934-Integration-Notes-for-Microsoft-Windows-10-and-Windows-11-Driver-Support-DS00002534.pdf
> */
> static const struct acpi_device_id pac1934_acpi_match[] = {
> - { "MCHP1930", .driver_data = (kernel_ulong_t)&pac1934_chip_config[PAC1934] },
> + { .id = "MCHP1930", .driver_data = (kernel_ulong_t)&pac1934_chip_config[PAC1934] },
> { }
> };
> MODULE_DEVICE_TABLE(acpi, pac1934_acpi_match);
> diff --git a/drivers/iio/adc/ti-adc081c.c b/drivers/iio/adc/ti-adc081c.c
> index 2df8f1c21c2a..d222c5637a71 100644
> --- a/drivers/iio/adc/ti-adc081c.c
> +++ b/drivers/iio/adc/ti-adc081c.c
> @@ -205,7 +205,7 @@ MODULE_DEVICE_TABLE(i2c, adc081c_id);
>
> static const struct acpi_device_id adc081c_acpi_match[] = {
> /* Used on some AAEON boards */
> - { "ADC081C", (kernel_ulong_t)&adc081c_model },
> + { .id = "ADC081C", .driver_data = (kernel_ulong_t)&adc081c_model },
> { }
> };
> MODULE_DEVICE_TABLE(acpi, adc081c_acpi_match);
> diff --git a/drivers/iio/adc/ti-adc108s102.c b/drivers/iio/adc/ti-adc108s102.c
> index 10959e835cb8..316d2eb16991 100644
> --- a/drivers/iio/adc/ti-adc108s102.c
> +++ b/drivers/iio/adc/ti-adc108s102.c
> @@ -270,7 +270,7 @@ static const struct of_device_id adc108s102_of_match[] = {
> MODULE_DEVICE_TABLE(of, adc108s102_of_match);
>
> static const struct acpi_device_id adc108s102_acpi_ids[] = {
> - { "INT3495", 0 },
> + { .id = "INT3495" },
> { }
> };
> MODULE_DEVICE_TABLE(acpi, adc108s102_acpi_ids);
> diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c
> index 1899813c1aee..381e2121a2b7 100644
> --- a/drivers/iio/adc/ti-adc128s052.c
> +++ b/drivers/iio/adc/ti-adc128s052.c
> @@ -264,7 +264,7 @@ static const struct spi_device_id adc128_id[] = {
> MODULE_DEVICE_TABLE(spi, adc128_id);
>
> static const struct acpi_device_id adc128_acpi_match[] = {
> - { "AANT1280", (kernel_ulong_t)&adc124s_config },
> + { .id = "AANT1280", .driver_data = (kernel_ulong_t)&adc124s_config },
> { }
> };
> MODULE_DEVICE_TABLE(acpi, adc128_acpi_match);
>
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
next prev parent reply other threads:[~2026-10-12 10:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 14:01 [PATCH 00/12] iio: use designated " Pawel Zalewski
2026-10-05 14:01 ` [PATCH 01/12] iio: accel: use named " Pawel Zalewski
2026-10-12 10:59 ` Matti Vaittinen
2026-10-05 14:01 ` [PATCH 02/12] iio: adc: " Pawel Zalewski
2026-10-12 10:57 ` Matti Vaittinen [this message]
2026-10-05 14:01 ` [PATCH 03/12] iio: dac: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 04/12] iio: gyro: bmg160_i2c: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 05/12] iio: humidity: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 06/12] iio: imu: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 07/12] iio: light: " Pawel Zalewski
2026-10-12 11:01 ` Matti Vaittinen
2026-10-05 14:02 ` [PATCH 08/12] iio: magnetometer: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 09/12] iio: potentiometer: max5487: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 10/12] iio: pressure: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 11/12] iio: proximity: " Pawel Zalewski
2026-10-05 14:02 ` [PATCH 12/12] iio: temperature: max30208: " Pawel Zalewski
2026-10-06 7:26 ` [PATCH 00/12] iio: use designated " Joshua Crofts
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=930d92e6-dee8-468f-8b54-bcc0bf41ae28@gmail.com \
--to=mazziesaccount@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=eajames@linux.ibm.com \
--cc=jagathjog1996@gmail.com \
--cc=jean-baptiste.maneyrol@tdk.com \
--cc=jic23@kernel.org \
--cc=ktsai@capellamicro.com \
--cc=lanzano.alex@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=lorenzo@kernel.org \
--cc=marcelo.schmitt@analog.com \
--cc=marius.cristea@microchip.com \
--cc=matteomartelli3@gmail.com \
--cc=nuno.sa@analog.com \
--cc=petre.rodan@subdimension.ro \
--cc=pzalewski@thegoodpenguin.co.uk \
/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
all inboxes | Powered by JetHome®