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 07/12] iio: light: use named initializers for acpi_device_id
Date: Mon, 12 Oct 2026 14:01:38 +0300 [thread overview]
Message-ID: <5b8b9ffc-253f-442f-8f16-88ab712bd442@gmail.com> (raw)
In-Reply-To: <20261005-acpi-iio-v1-7-2796f713945a@thegoodpenguin.co.uk>
On 05/10/2026 17:02, 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/light/acpi-als.c | 2 +-
> drivers/iio/light/al3320a.c | 2 +-
> drivers/iio/light/apds9960.c | 2 +-
> drivers/iio/light/cm32181.c | 2 +-
> drivers/iio/light/isl29018.c | 6 +++---
> drivers/iio/light/jsa1212.c | 2 +-
> drivers/iio/light/ltr501.c | 4 ++--
> drivers/iio/light/max44000.c | 2 +-
> drivers/iio/light/pa12203001.c | 2 +-
> drivers/iio/light/rpr0521.c | 2 +-
> drivers/iio/light/stk3310.c | 6 +++---
> drivers/iio/light/us5182d.c | 2 +-
> 12 files changed, 17 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/iio/light/acpi-als.c b/drivers/iio/light/acpi-als.c
> index 1983a7f17aa9..9faaffb94b8f 100644
> --- a/drivers/iio/light/acpi-als.c
> +++ b/drivers/iio/light/acpi-als.c
> @@ -238,7 +238,7 @@ static void acpi_als_remove(struct platform_device *pdev)
> }
>
> static const struct acpi_device_id acpi_als_device_ids[] = {
> - {"ACPI0008", 0},
> + { .id = "ACPI0008" },
> { }
> };
>
> diff --git a/drivers/iio/light/al3320a.c b/drivers/iio/light/al3320a.c
> index 8bb7f7e878c2..1610a09ee204 100644
> --- a/drivers/iio/light/al3320a.c
> +++ b/drivers/iio/light/al3320a.c
> @@ -259,7 +259,7 @@ static const struct of_device_id al3320a_of_match[] = {
> MODULE_DEVICE_TABLE(of, al3320a_of_match);
>
> static const struct acpi_device_id al3320a_acpi_match[] = {
> - {"CALS0001"},
> + { .id = "CALS0001" },
> { }
> };
> MODULE_DEVICE_TABLE(acpi, al3320a_acpi_match);
> diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c
> index afe520de60e2..996ab9a9ee27 100644
> --- a/drivers/iio/light/apds9960.c
> +++ b/drivers/iio/light/apds9960.c
> @@ -1158,7 +1158,7 @@ static const struct i2c_device_id apds9960_id[] = {
> MODULE_DEVICE_TABLE(i2c, apds9960_id);
>
> static const struct acpi_device_id apds9960_acpi_match[] = {
> - { "MSHW0184" },
> + { .id = "MSHW0184" },
> { }
> };
> MODULE_DEVICE_TABLE(acpi, apds9960_acpi_match);
> diff --git a/drivers/iio/light/cm32181.c b/drivers/iio/light/cm32181.c
> index b32a94028f09..8b376e5a9f08 100644
> --- a/drivers/iio/light/cm32181.c
> +++ b/drivers/iio/light/cm32181.c
> @@ -527,7 +527,7 @@ MODULE_DEVICE_TABLE(of, cm32181_of_match);
>
> #ifdef CONFIG_ACPI
> static const struct acpi_device_id cm32181_acpi_match[] = {
> - { "CPLM3218", 0 },
> + { .id = "CPLM3218" },
> { }
> };
> MODULE_DEVICE_TABLE(acpi, cm32181_acpi_match);
> diff --git a/drivers/iio/light/isl29018.c b/drivers/iio/light/isl29018.c
> index 759cb71ed1c5..3463da0f7a98 100644
> --- a/drivers/iio/light/isl29018.c
> +++ b/drivers/iio/light/isl29018.c
> @@ -820,9 +820,9 @@ static DEFINE_SIMPLE_DEV_PM_OPS(isl29018_pm_ops, isl29018_suspend,
> isl29018_resume);
>
> static const struct acpi_device_id isl29018_acpi_match[] = {
> - {"ISL29018", isl29018},
> - {"ISL29023", isl29023},
> - {"ISL29035", isl29035},
> + { .id = "ISL29018", .driver_data = isl29018 },
> + { .id = "ISL29023", .driver_data = isl29023 },
> + { .id = "ISL29035", .driver_data = isl29035 },
> { }
> };
> MODULE_DEVICE_TABLE(acpi, isl29018_acpi_match);
> diff --git a/drivers/iio/light/jsa1212.c b/drivers/iio/light/jsa1212.c
> index 038ee49723ae..8a08cc468872 100644
> --- a/drivers/iio/light/jsa1212.c
> +++ b/drivers/iio/light/jsa1212.c
> @@ -421,7 +421,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(jsa1212_pm_ops, jsa1212_suspend,
> jsa1212_resume);
>
> static const struct acpi_device_id jsa1212_acpi_match[] = {
> - {"JSA1212", 0},
> + { .id = "JSA1212" },
> { }
> };
> MODULE_DEVICE_TABLE(acpi, jsa1212_acpi_match);
> diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c
> index fa0d16890c8b..5d2d020ddbc0 100644
> --- a/drivers/iio/light/ltr501.c
> +++ b/drivers/iio/light/ltr501.c
> @@ -1589,9 +1589,9 @@ static int ltr501_resume(struct device *dev)
> static DEFINE_SIMPLE_DEV_PM_OPS(ltr501_pm_ops, ltr501_suspend, ltr501_resume);
>
> static const struct acpi_device_id ltr_acpi_match[] = {
> - { "LTER0301", ltr301 },
> + { .id = "LTER0301", .driver_data = ltr301 },
> /* https://www.catalog.update.microsoft.com/Search.aspx?q=lter0303 */
> - { "LTER0303", ltr303 },
> + { .id = "LTER0303", .driver_data = ltr303 },
> { }
> };
> MODULE_DEVICE_TABLE(acpi, ltr_acpi_match);
> diff --git a/drivers/iio/light/max44000.c b/drivers/iio/light/max44000.c
> index 8c344f1b3fe2..2d25bdcfe5ae 100644
> --- a/drivers/iio/light/max44000.c
> +++ b/drivers/iio/light/max44000.c
> @@ -603,7 +603,7 @@ static const struct i2c_device_id max44000_id[] = {
> MODULE_DEVICE_TABLE(i2c, max44000_id);
>
> static const struct acpi_device_id max44000_acpi_match[] = {
> - {"MAX44000", 0},
> + { .id = "MAX44000" },
> { }
> };
> MODULE_DEVICE_TABLE(acpi, max44000_acpi_match);
> diff --git a/drivers/iio/light/pa12203001.c b/drivers/iio/light/pa12203001.c
> index c0f4db8d95f7..657ba24def38 100644
> --- a/drivers/iio/light/pa12203001.c
> +++ b/drivers/iio/light/pa12203001.c
> @@ -450,7 +450,7 @@ static const struct dev_pm_ops pa12203001_pm_ops = {
> };
>
> static const struct acpi_device_id pa12203001_acpi_match[] = {
> - { "TXCPA122", 0 },
> + { .id = "TXCPA122" },
> { }
> };
>
> diff --git a/drivers/iio/light/rpr0521.c b/drivers/iio/light/rpr0521.c
> index 7d82efc31f3a..b429c7b8b0fb 100644
> --- a/drivers/iio/light/rpr0521.c
> +++ b/drivers/iio/light/rpr0521.c
> @@ -1095,7 +1095,7 @@ static const struct dev_pm_ops rpr0521_pm_ops = {
> };
>
> static const struct acpi_device_id rpr0521_acpi_match[] = {
> - {"RPR0521", 0},
> + { .id = "RPR0521" },
> { }
> };
> MODULE_DEVICE_TABLE(acpi, rpr0521_acpi_match);
> diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
> index 7c8a1d2b2ed0..37ae90c84779 100644
> --- a/drivers/iio/light/stk3310.c
> +++ b/drivers/iio/light/stk3310.c
> @@ -775,9 +775,9 @@ static const struct i2c_device_id stk3310_i2c_id[] = {
> MODULE_DEVICE_TABLE(i2c, stk3310_i2c_id);
>
> static const struct acpi_device_id stk3310_acpi_id[] = {
> - {"STK3013", 0},
> - {"STK3310", 0},
> - {"STK3311", 0},
> + { .id = "STK3013" },
> + { .id = "STK3310" },
> + { .id = "STK3311" },
> { }
> };
>
> diff --git a/drivers/iio/light/us5182d.c b/drivers/iio/light/us5182d.c
> index ab518311fd79..5d05c751e13f 100644
> --- a/drivers/iio/light/us5182d.c
> +++ b/drivers/iio/light/us5182d.c
> @@ -941,7 +941,7 @@ static const struct dev_pm_ops us5182d_pm_ops = {
> };
>
> static const struct acpi_device_id us5182d_acpi_match[] = {
> - { "USD5182", 0 },
> + { .id = "USD5182" },
> { }
> };
>
>
--
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 11:01 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 initializers for acpi_device_id 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
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 [this message]
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=5b8b9ffc-253f-442f-8f16-88ab712bd442@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.