* [PATCH 0/5] media: use designated initializers for acpi_device_id
@ 2026-10-29 16:54 Pawel Zalewski
2026-10-29 16:54 ` [PATCH 1/5] media: cec: seco: Use named " Pawel Zalewski
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Pawel Zalewski @ 2026-10-29 16:54 UTC (permalink / raw)
To: Ettore Chimenti, Hans Verkuil, Mauro Carvalho Chehab,
Sakari Ailus, Miguel Vadillo, Antti Laakso, Hans de Goede,
Laurent Pinchart, Bingbu Cao, Bryan O'Donoghue, Jimmy Su,
Matthias Fend, Arec Kao, Rui Miguel Silva, Daniel Scally,
Kate Hsuan
Cc: linux-media, linux-kernel, Pawel Zalewski
This series is converting lists that contain the acpi_device_id struct,
which is defined in the include/linux/device-id/acpi.h to make use of named
initializers (which they do not use currently). This work is part of the on
going effort in the kernel associated with device-ids [1]
The plan is to convert acpi_device_id::driver_data to have an anonymous
union, similarly to what was introduced for PCI and I2C device ID tables.
The goal is to increase type-safety (most of the existing casts are gone),
to improve readability and to make use intent a bit more clear:
```
union {
kernel_ulong_t driver_data;
const void *driver_data_ptr;
}
```
But for that to work all lists containing the structs need to use named
initializers first to avoid triggering -Wmissing-braces. I already have
patches that implement this and touching a lot of kernel subsystmes that
use the acpi_device_id struct and that list keeps on growing. Therefore,
I have decided to split the series per every subsystem into:
- pre-clean-ups that convert the lists to use named initializers
(which is this series)
- actual implementations that make some of the modules use the new
driver_data_ptr member
That way the task can be fragmented into manageable and independent chunks
of work and makes this effort easier to review.
Tested builds on x86-64 and a64 in Yocto using 7.3.
[1] https://lore.kernel.org/all/cover.1780048925.git.u.kleine-koenig@baylibre.com/
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
---
Pawel Zalewski (5):
media: cec: seco: Use named initializers for acpi_device_id
media: i2c: ccs: Unify list terminator for acpi_device_id
media: i2c: cvs: Use named initializers for acpi_device_id
media: i2c: Use named initializers for acpi_device_id
media: pci: intel: Use named initializers for acpi_device_id
drivers/media/cec/platform/seco/seco-cec.c | 4 ++--
drivers/media/i2c/ccs/ccs-core.c | 2 +-
drivers/media/i2c/cvs/core.c | 8 ++++----
drivers/media/i2c/gc0310.c | 4 ++--
drivers/media/i2c/hi556.c | 4 ++--
drivers/media/i2c/hi847.c | 4 ++--
drivers/media/i2c/imx208.c | 4 ++--
drivers/media/i2c/imx258.c | 4 ++--
drivers/media/i2c/lt6911uxe.c | 4 ++--
drivers/media/i2c/mt9m114.c | 4 ++--
drivers/media/i2c/og01a1b.c | 4 ++--
drivers/media/i2c/ov01a10.c | 4 ++--
drivers/media/i2c/ov02c10.c | 4 ++--
drivers/media/i2c/ov02e10.c | 4 ++--
drivers/media/i2c/ov08d10.c | 4 ++--
drivers/media/i2c/ov08x40.c | 4 ++--
drivers/media/i2c/ov13858.c | 4 ++--
drivers/media/i2c/ov13b10.c | 8 ++++----
drivers/media/i2c/ov2680.c | 4 ++--
drivers/media/i2c/ov2740.c | 4 ++--
drivers/media/i2c/ov5670.c | 4 ++--
drivers/media/i2c/ov5675.c | 4 ++--
drivers/media/i2c/ov5693.c | 6 +++---
drivers/media/i2c/ov7251.c | 2 +-
drivers/media/i2c/ov8856.c | 4 ++--
drivers/media/i2c/ov8865.c | 2 +-
drivers/media/i2c/ov9734.c | 4 ++--
drivers/media/i2c/t4ka3.c | 4 ++--
drivers/media/pci/intel/ipu-bridge.c | 8 ++++----
29 files changed, 62 insertions(+), 62 deletions(-)
---
base-commit: 65ba8f34ec886ec72b2c07ddc8cf3d815c32869d
change-id: 20261022-acpi-media-24f3bc53b2dc
Best regards,
--
Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/5] media: cec: seco: Use named initializers for acpi_device_id 2026-10-29 16:54 [PATCH 0/5] media: use designated initializers for acpi_device_id Pawel Zalewski @ 2026-10-29 16:54 ` Pawel Zalewski 2026-11-19 15:09 ` Mauro Carvalho Chehab 2026-10-29 16:54 ` [PATCH 2/5] media: i2c: ccs: Unify list terminator " Pawel Zalewski ` (3 subsequent siblings) 4 siblings, 1 reply; 7+ messages in thread From: Pawel Zalewski @ 2026-10-29 16:54 UTC (permalink / raw) To: Ettore Chimenti, Hans Verkuil, Mauro Carvalho Chehab, Sakari Ailus, Miguel Vadillo, Antti Laakso, Hans de Goede, Laurent Pinchart, Bingbu Cao, Bryan O'Donoghue, Jimmy Su, Matthias Fend, Arec Kao, Rui Miguel Silva, Daniel Scally, Kate Hsuan Cc: linux-media, linux-kernel, Pawel Zalewski 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. Unify the list terminator to have a single space between the brackets and no trailing comma. Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> --- drivers/media/cec/platform/seco/seco-cec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/cec/platform/seco/seco-cec.c b/drivers/media/cec/platform/seco/seco-cec.c index 12db6dca602b..2d7ee5638eba 100644 --- a/drivers/media/cec/platform/seco/seco-cec.c +++ b/drivers/media/cec/platform/seco/seco-cec.c @@ -768,8 +768,8 @@ static SIMPLE_DEV_PM_OPS(secocec_pm_ops, secocec_suspend, secocec_resume); #ifdef CONFIG_ACPI static const struct acpi_device_id secocec_acpi_match[] = { - {"CEC00001", 0}, - {}, + { .id = "CEC00001" }, + { } }; MODULE_DEVICE_TABLE(acpi, secocec_acpi_match); -- 2.53.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/5] media: cec: seco: Use named initializers for acpi_device_id 2026-10-29 16:54 ` [PATCH 1/5] media: cec: seco: Use named " Pawel Zalewski @ 2026-11-19 15:09 ` Mauro Carvalho Chehab 0 siblings, 0 replies; 7+ messages in thread From: Mauro Carvalho Chehab @ 2026-11-19 15:09 UTC (permalink / raw) To: Pawel Zalewski Cc: Ettore Chimenti, Hans Verkuil, Mauro Carvalho Chehab, Sakari Ailus, Miguel Vadillo, Antti Laakso, Hans de Goede, Laurent Pinchart, Bingbu Cao, Bryan O'Donoghue, Jimmy Su, Matthias Fend, Arec Kao, Rui Miguel Silva, Daniel Scally, Kate Hsuan, linux-media, linux-kernel On Thu, 29 Oct 2026 16:54:13 +0000 Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> 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. > > Unify the list terminator to have a single space between the brackets and > no trailing comma. > > Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> LGTM. Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> > --- > drivers/media/cec/platform/seco/seco-cec.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/cec/platform/seco/seco-cec.c b/drivers/media/cec/platform/seco/seco-cec.c > index 12db6dca602b..2d7ee5638eba 100644 > --- a/drivers/media/cec/platform/seco/seco-cec.c > +++ b/drivers/media/cec/platform/seco/seco-cec.c > @@ -768,8 +768,8 @@ static SIMPLE_DEV_PM_OPS(secocec_pm_ops, secocec_suspend, secocec_resume); > > #ifdef CONFIG_ACPI > static const struct acpi_device_id secocec_acpi_match[] = { > - {"CEC00001", 0}, > - {}, > + { .id = "CEC00001" }, > + { } > }; > > MODULE_DEVICE_TABLE(acpi, secocec_acpi_match); > Thanks, Mauro ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/5] media: i2c: ccs: Unify list terminator for acpi_device_id 2026-10-29 16:54 [PATCH 0/5] media: use designated initializers for acpi_device_id Pawel Zalewski 2026-10-29 16:54 ` [PATCH 1/5] media: cec: seco: Use named " Pawel Zalewski @ 2026-10-29 16:54 ` Pawel Zalewski 2026-10-29 16:54 ` [PATCH 3/5] media: i2c: cvs: Use named initializers " Pawel Zalewski ` (2 subsequent siblings) 4 siblings, 0 replies; 7+ messages in thread From: Pawel Zalewski @ 2026-10-29 16:54 UTC (permalink / raw) To: Ettore Chimenti, Hans Verkuil, Mauro Carvalho Chehab, Sakari Ailus, Miguel Vadillo, Antti Laakso, Hans de Goede, Laurent Pinchart, Bingbu Cao, Bryan O'Donoghue, Jimmy Su, Matthias Fend, Arec Kao, Rui Miguel Silva, Daniel Scally, Kate Hsuan Cc: linux-media, linux-kernel, Pawel Zalewski Unify the list terminator to have a single space between the brackets and no trailing comma. Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> --- drivers/media/i2c/ccs/ccs-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ccs/ccs-core.c b/drivers/media/i2c/ccs/ccs-core.c index 1cc4350856fd..2151f62daa68 100644 --- a/drivers/media/i2c/ccs/ccs-core.c +++ b/drivers/media/i2c/ccs/ccs-core.c @@ -3666,7 +3666,7 @@ static const struct ccs_device ccs_device = {}; static const struct acpi_device_id ccs_acpi_table[] = { { .id = "MIPI0200", .driver_data = (unsigned long)&ccs_device }, - { }, + { } }; MODULE_DEVICE_TABLE(acpi, ccs_acpi_table); -- 2.53.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/5] media: i2c: cvs: Use named initializers for acpi_device_id 2026-10-29 16:54 [PATCH 0/5] media: use designated initializers for acpi_device_id Pawel Zalewski 2026-10-29 16:54 ` [PATCH 1/5] media: cec: seco: Use named " Pawel Zalewski 2026-10-29 16:54 ` [PATCH 2/5] media: i2c: ccs: Unify list terminator " Pawel Zalewski @ 2026-10-29 16:54 ` Pawel Zalewski 2026-10-29 16:54 ` [PATCH 4/5] media: i2c: " Pawel Zalewski 2026-10-29 16:54 ` [PATCH 5/5] media: pci: intel: " Pawel Zalewski 4 siblings, 0 replies; 7+ messages in thread From: Pawel Zalewski @ 2026-10-29 16:54 UTC (permalink / raw) To: Ettore Chimenti, Hans Verkuil, Mauro Carvalho Chehab, Sakari Ailus, Miguel Vadillo, Antti Laakso, Hans de Goede, Laurent Pinchart, Bingbu Cao, Bryan O'Donoghue, Jimmy Su, Matthias Fend, Arec Kao, Rui Miguel Silva, Daniel Scally, Kate Hsuan Cc: linux-media, linux-kernel, Pawel Zalewski 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. Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> --- drivers/media/i2c/cvs/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/cvs/core.c b/drivers/media/i2c/cvs/core.c index d9c51e1c0fb5..ce9f45cf942a 100644 --- a/drivers/media/i2c/cvs/core.c +++ b/drivers/media/i2c/cvs/core.c @@ -961,10 +961,10 @@ static const struct dev_pm_ops __maybe_unused cvs_pm_ops = { }; static const struct acpi_device_id intel_cvs_acpi_match[] = { - { "INTC10DE" }, /* LNL */ - { "INTC10E0" }, /* ARL */ - { "INTC10E1" }, /* PTL */ - { "INTC10FA" }, /* NVL */ + { .id = "INTC10DE" }, /* LNL */ + { .id = "INTC10E0" }, /* ARL */ + { .id = "INTC10E1" }, /* PTL */ + { .id = "INTC10FA" }, /* NVL */ { } }; MODULE_DEVICE_TABLE(acpi, intel_cvs_acpi_match); -- 2.53.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 4/5] media: i2c: Use named initializers for acpi_device_id 2026-10-29 16:54 [PATCH 0/5] media: use designated initializers for acpi_device_id Pawel Zalewski ` (2 preceding siblings ...) 2026-10-29 16:54 ` [PATCH 3/5] media: i2c: cvs: Use named initializers " Pawel Zalewski @ 2026-10-29 16:54 ` Pawel Zalewski 2026-10-29 16:54 ` [PATCH 5/5] media: pci: intel: " Pawel Zalewski 4 siblings, 0 replies; 7+ messages in thread From: Pawel Zalewski @ 2026-10-29 16:54 UTC (permalink / raw) To: Ettore Chimenti, Hans Verkuil, Mauro Carvalho Chehab, Sakari Ailus, Miguel Vadillo, Antti Laakso, Hans de Goede, Laurent Pinchart, Bingbu Cao, Bryan O'Donoghue, Jimmy Su, Matthias Fend, Arec Kao, Rui Miguel Silva, Daniel Scally, Kate Hsuan Cc: linux-media, linux-kernel, Pawel Zalewski 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. Unify the list terminator to have a single space between the brackets and no trailing comma. Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> --- drivers/media/i2c/gc0310.c | 4 ++-- drivers/media/i2c/hi556.c | 4 ++-- drivers/media/i2c/hi847.c | 4 ++-- drivers/media/i2c/imx208.c | 4 ++-- drivers/media/i2c/imx258.c | 4 ++-- drivers/media/i2c/lt6911uxe.c | 4 ++-- drivers/media/i2c/mt9m114.c | 4 ++-- drivers/media/i2c/og01a1b.c | 4 ++-- drivers/media/i2c/ov01a10.c | 4 ++-- drivers/media/i2c/ov02c10.c | 4 ++-- drivers/media/i2c/ov02e10.c | 4 ++-- drivers/media/i2c/ov08d10.c | 4 ++-- drivers/media/i2c/ov08x40.c | 4 ++-- drivers/media/i2c/ov13858.c | 4 ++-- drivers/media/i2c/ov13b10.c | 8 ++++---- drivers/media/i2c/ov2680.c | 4 ++-- drivers/media/i2c/ov2740.c | 4 ++-- drivers/media/i2c/ov5670.c | 4 ++-- drivers/media/i2c/ov5675.c | 4 ++-- drivers/media/i2c/ov5693.c | 6 +++--- drivers/media/i2c/ov7251.c | 2 +- drivers/media/i2c/ov8856.c | 4 ++-- drivers/media/i2c/ov8865.c | 2 +- drivers/media/i2c/ov9734.c | 4 ++-- drivers/media/i2c/t4ka3.c | 4 ++-- 25 files changed, 51 insertions(+), 51 deletions(-) diff --git a/drivers/media/i2c/gc0310.c b/drivers/media/i2c/gc0310.c index 5e941291dbf7..f822fe3fe200 100644 --- a/drivers/media/i2c/gc0310.c +++ b/drivers/media/i2c/gc0310.c @@ -759,8 +759,8 @@ static DEFINE_RUNTIME_DEV_PM_OPS(gc0310_pm_ops, gc0310_power_off, gc0310_power_on, NULL); static const struct acpi_device_id gc0310_acpi_match[] = { - {"INT0310"}, - {}, + { .id = "INT0310" }, + { } }; MODULE_DEVICE_TABLE(acpi, gc0310_acpi_match); diff --git a/drivers/media/i2c/hi556.c b/drivers/media/i2c/hi556.c index 4c13adf4a900..55c2a59bee07 100644 --- a/drivers/media/i2c/hi556.c +++ b/drivers/media/i2c/hi556.c @@ -1432,8 +1432,8 @@ static DEFINE_RUNTIME_DEV_PM_OPS(hi556_pm_ops, hi556_suspend, hi556_resume, #ifdef CONFIG_ACPI static const struct acpi_device_id hi556_acpi_ids[] = { - {"INT3537"}, - {} + { .id = "INT3537" }, + { } }; MODULE_DEVICE_TABLE(acpi, hi556_acpi_ids); diff --git a/drivers/media/i2c/hi847.c b/drivers/media/i2c/hi847.c index 41b8cac6a5e3..7af74b41786b 100644 --- a/drivers/media/i2c/hi847.c +++ b/drivers/media/i2c/hi847.c @@ -2934,8 +2934,8 @@ static int hi847_probe(struct i2c_client *client) #ifdef CONFIG_ACPI static const struct acpi_device_id hi847_acpi_ids[] = { - {"HYV0847"}, - {} + { .id = "HYV0847" }, + { } }; MODULE_DEVICE_TABLE(acpi, hi847_acpi_ids); diff --git a/drivers/media/i2c/imx208.c b/drivers/media/i2c/imx208.c index 3a899b41a9d2..ea7d102c7383 100644 --- a/drivers/media/i2c/imx208.c +++ b/drivers/media/i2c/imx208.c @@ -1044,8 +1044,8 @@ static void imx208_remove(struct i2c_client *client) #ifdef CONFIG_ACPI static const struct acpi_device_id imx208_acpi_ids[] = { - { "INT3478" }, - { /* sentinel */ } + { .id = "INT3478" }, + { } }; MODULE_DEVICE_TABLE(acpi, imx208_acpi_ids); diff --git a/drivers/media/i2c/imx258.c b/drivers/media/i2c/imx258.c index 065c33380f60..51982645ae55 100644 --- a/drivers/media/i2c/imx258.c +++ b/drivers/media/i2c/imx258.c @@ -1536,8 +1536,8 @@ static const struct dev_pm_ops imx258_pm_ops = { #ifdef CONFIG_ACPI static const struct acpi_device_id imx258_acpi_ids[] = { - { "SONY258A" }, - { /* sentinel */ } + { .id = "SONY258A" }, + { } }; MODULE_DEVICE_TABLE(acpi, imx258_acpi_ids); diff --git a/drivers/media/i2c/lt6911uxe.c b/drivers/media/i2c/lt6911uxe.c index c9da174dbfa6..8d97d0000ae8 100644 --- a/drivers/media/i2c/lt6911uxe.c +++ b/drivers/media/i2c/lt6911uxe.c @@ -687,8 +687,8 @@ static int lt6911uxe_probe(struct i2c_client *client) } static const struct acpi_device_id lt6911uxe_acpi_ids[] = { - { "INTC10C5" }, - {} + { .id = "INTC10C5" }, + { } }; MODULE_DEVICE_TABLE(acpi, lt6911uxe_acpi_ids); diff --git a/drivers/media/i2c/mt9m114.c b/drivers/media/i2c/mt9m114.c index c6c950d5c8f3..f9dc4f6b83d9 100644 --- a/drivers/media/i2c/mt9m114.c +++ b/drivers/media/i2c/mt9m114.c @@ -2679,8 +2679,8 @@ static const struct of_device_id mt9m114_of_ids[] = { MODULE_DEVICE_TABLE(of, mt9m114_of_ids); static const struct acpi_device_id mt9m114_acpi_ids[] = { - { "INT33F0", (kernel_ulong_t)&mt9m114_models_default }, - { /* sentinel */ } + { .id = "INT33F0", .driver_data = (kernel_ulong_t)&mt9m114_models_default }, + { } }; MODULE_DEVICE_TABLE(acpi, mt9m114_acpi_ids); diff --git a/drivers/media/i2c/og01a1b.c b/drivers/media/i2c/og01a1b.c index b207b1d853a4..41f00f3b94f3 100644 --- a/drivers/media/i2c/og01a1b.c +++ b/drivers/media/i2c/og01a1b.c @@ -1117,8 +1117,8 @@ static const struct dev_pm_ops og01a1b_pm_ops = { #ifdef CONFIG_ACPI static const struct acpi_device_id og01a1b_acpi_ids[] = { - {"OVTI01AC"}, - {} + { .id = "OVTI01AC" }, + { } }; MODULE_DEVICE_TABLE(acpi, og01a1b_acpi_ids); diff --git a/drivers/media/i2c/ov01a10.c b/drivers/media/i2c/ov01a10.c index b9a7dacd603e..932254f2fbe1 100644 --- a/drivers/media/i2c/ov01a10.c +++ b/drivers/media/i2c/ov01a10.c @@ -1114,8 +1114,8 @@ static const struct ov01a10_sensor_cfg ov01a1b_cfg = { }; static const struct acpi_device_id ov01a10_acpi_ids[] = { - { "OVTI01A0", (uintptr_t)&ov01a10_cfg }, - { "OVTI01AB", (uintptr_t)&ov01a1b_cfg }, + { .id = "OVTI01A0", .driver_data = (uintptr_t)&ov01a10_cfg }, + { .id = "OVTI01AB", .driver_data = (uintptr_t)&ov01a1b_cfg }, { } }; diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c index 8ffe0a07ef85..f915a64f8e47 100644 --- a/drivers/media/i2c/ov02c10.c +++ b/drivers/media/i2c/ov02c10.c @@ -984,8 +984,8 @@ static DEFINE_RUNTIME_DEV_PM_OPS(ov02c10_pm_ops, ov02c10_power_off, #ifdef CONFIG_ACPI static const struct acpi_device_id ov02c10_acpi_ids[] = { - { "OVTI02C1" }, - { /* sentinel */ } + { .id = "OVTI02C1" }, + { } }; MODULE_DEVICE_TABLE(acpi, ov02c10_acpi_ids); diff --git a/drivers/media/i2c/ov02e10.c b/drivers/media/i2c/ov02e10.c index 5c1e7013f559..8e2d3dc5888b 100644 --- a/drivers/media/i2c/ov02e10.c +++ b/drivers/media/i2c/ov02e10.c @@ -924,8 +924,8 @@ static DEFINE_RUNTIME_DEV_PM_OPS(ov02e10_pm_ops, ov02e10_power_off, ov02e10_power_on, NULL); static const struct acpi_device_id ov02e10_acpi_ids[] = { - { "OVTI02E1" }, - { /* sentinel */ } + { .id = "OVTI02E1" }, + { } }; MODULE_DEVICE_TABLE(acpi, ov02e10_acpi_ids); diff --git a/drivers/media/i2c/ov08d10.c b/drivers/media/i2c/ov08d10.c index 0710d2243cc0..67f167a7f77c 100644 --- a/drivers/media/i2c/ov08d10.c +++ b/drivers/media/i2c/ov08d10.c @@ -1596,8 +1596,8 @@ static DEFINE_RUNTIME_DEV_PM_OPS(ov08d10_pm_ops, #ifdef CONFIG_ACPI static const struct acpi_device_id ov08d10_acpi_ids[] = { - { "OVTI08D1" }, - { /* sentinel */ } + { .id = "OVTI08D1" }, + { } }; MODULE_DEVICE_TABLE(acpi, ov08d10_acpi_ids); diff --git a/drivers/media/i2c/ov08x40.c b/drivers/media/i2c/ov08x40.c index 6de0c17e633d..df2c63d64e62 100644 --- a/drivers/media/i2c/ov08x40.c +++ b/drivers/media/i2c/ov08x40.c @@ -2372,8 +2372,8 @@ static DEFINE_RUNTIME_DEV_PM_OPS(ov08x40_pm_ops, ov08x40_power_off, #ifdef CONFIG_ACPI static const struct acpi_device_id ov08x40_acpi_ids[] = { - {"OVTI08F4"}, - { /* sentinel */ } + { .id = "OVTI08F4" }, + { } }; MODULE_DEVICE_TABLE(acpi, ov08x40_acpi_ids); diff --git a/drivers/media/i2c/ov13858.c b/drivers/media/i2c/ov13858.c index 5a49fa0ec026..c086d5292537 100644 --- a/drivers/media/i2c/ov13858.c +++ b/drivers/media/i2c/ov13858.c @@ -1806,8 +1806,8 @@ MODULE_DEVICE_TABLE(i2c, ov13858_id_table); #ifdef CONFIG_ACPI static const struct acpi_device_id ov13858_acpi_ids[] = { - {"OVTID858"}, - { /* sentinel */ } + { .id = "OVTID858" }, + { } }; MODULE_DEVICE_TABLE(acpi, ov13858_acpi_ids); diff --git a/drivers/media/i2c/ov13b10.c b/drivers/media/i2c/ov13b10.c index 242a95834126..59e94b2f661d 100644 --- a/drivers/media/i2c/ov13b10.c +++ b/drivers/media/i2c/ov13b10.c @@ -1697,10 +1697,10 @@ static DEFINE_RUNTIME_DEV_PM_OPS(ov13b10_pm_ops, ov13b10_suspend, #ifdef CONFIG_ACPI static const struct acpi_device_id ov13b10_acpi_ids[] = { - {"OVTIDB10"}, - {"OVTI13B1"}, - {"OMNI13B1"}, /* ASUS ROG Flow Z13 (GZ302) uses this ACPI ID */ - { /* sentinel */ } + { .id = "OVTIDB10" }, + { .id = "OVTI13B1" }, + { .id = "OMNI13B1" }, /* ASUS ROG Flow Z13 (GZ302) uses this ACPI ID */ + { } }; MODULE_DEVICE_TABLE(acpi, ov13b10_acpi_ids); diff --git a/drivers/media/i2c/ov2680.c b/drivers/media/i2c/ov2680.c index 147862a813c5..8bfcd8bd3ae4 100644 --- a/drivers/media/i2c/ov2680.c +++ b/drivers/media/i2c/ov2680.c @@ -1304,8 +1304,8 @@ static const struct of_device_id ov2680_dt_ids[] = { MODULE_DEVICE_TABLE(of, ov2680_dt_ids); static const struct acpi_device_id ov2680_acpi_ids[] = { - { "OVTI2680" }, - { /* sentinel */ } + { .id = "OVTI2680" }, + { } }; MODULE_DEVICE_TABLE(acpi, ov2680_acpi_ids); diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c index 536325bb7b92..fbba9e5a5fba 100644 --- a/drivers/media/i2c/ov2740.c +++ b/drivers/media/i2c/ov2740.c @@ -1462,8 +1462,8 @@ static DEFINE_RUNTIME_DEV_PM_OPS(ov2740_pm_ops, ov2740_suspend, ov2740_resume, NULL); static const struct acpi_device_id ov2740_acpi_ids[] = { - {"INT3474"}, - {} + { .id = "INT3474" }, + { } }; MODULE_DEVICE_TABLE(acpi, ov2740_acpi_ids); diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c index 940f21fe0dd3..84d209955385 100644 --- a/drivers/media/i2c/ov5670.c +++ b/drivers/media/i2c/ov5670.c @@ -2797,8 +2797,8 @@ static const struct dev_pm_ops ov5670_pm_ops = { #ifdef CONFIG_ACPI static const struct acpi_device_id ov5670_acpi_ids[] = { - { "INT3479" }, - { /* sentinel */ } + { .id = "INT3479" }, + { } }; MODULE_DEVICE_TABLE(acpi, ov5670_acpi_ids); diff --git a/drivers/media/i2c/ov5675.c b/drivers/media/i2c/ov5675.c index c5eb07576129..47837d13c1f2 100644 --- a/drivers/media/i2c/ov5675.c +++ b/drivers/media/i2c/ov5675.c @@ -1355,8 +1355,8 @@ static const struct dev_pm_ops ov5675_pm_ops = { #ifdef CONFIG_ACPI static const struct acpi_device_id ov5675_acpi_ids[] = { - {"OVTI5675"}, - {} + { .id = "OVTI5675" }, + { } }; MODULE_DEVICE_TABLE(acpi, ov5675_acpi_ids); diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c index 56599f9ca74b..d2eff7422194 100644 --- a/drivers/media/i2c/ov5693.c +++ b/drivers/media/i2c/ov5693.c @@ -1422,9 +1422,9 @@ static const struct dev_pm_ops ov5693_pm_ops = { }; static const struct acpi_device_id ov5693_acpi_match[] = { - {"INT33BE"}, - {"OVTI5693"}, - {}, + { .id = "INT33BE" }, + { .id = "OVTI5693" }, + { } }; MODULE_DEVICE_TABLE(acpi, ov5693_acpi_match); diff --git a/drivers/media/i2c/ov7251.c b/drivers/media/i2c/ov7251.c index fce6344b5120..5b03343a0350 100644 --- a/drivers/media/i2c/ov7251.c +++ b/drivers/media/i2c/ov7251.c @@ -1802,7 +1802,7 @@ static const struct of_device_id ov7251_of_match[] = { MODULE_DEVICE_TABLE(of, ov7251_of_match); static const struct acpi_device_id ov7251_acpi_match[] = { - { "INT347E" }, + { .id = "INT347E" }, { } }; MODULE_DEVICE_TABLE(acpi, ov7251_acpi_match); diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c index 42c4b9c4e380..7a825738777c 100644 --- a/drivers/media/i2c/ov8856.c +++ b/drivers/media/i2c/ov8856.c @@ -2457,8 +2457,8 @@ static const struct dev_pm_ops ov8856_pm_ops = { #ifdef CONFIG_ACPI static const struct acpi_device_id ov8856_acpi_ids[] = { - {"OVTI8856"}, - {} + { .id = "OVTI8856" }, + { } }; MODULE_DEVICE_TABLE(acpi, ov8856_acpi_ids); diff --git a/drivers/media/i2c/ov8865.c b/drivers/media/i2c/ov8865.c index 5a59cca8eeae..a28ee2cd2232 100644 --- a/drivers/media/i2c/ov8865.c +++ b/drivers/media/i2c/ov8865.c @@ -3130,7 +3130,7 @@ static const struct dev_pm_ops ov8865_pm_ops = { }; static const struct acpi_device_id ov8865_acpi_match[] = { - {"INT347A"}, + { .id = "INT347A" }, { } }; MODULE_DEVICE_TABLE(acpi, ov8865_acpi_match); diff --git a/drivers/media/i2c/ov9734.c b/drivers/media/i2c/ov9734.c index 8f39609ad1b6..31d22de7efd3 100644 --- a/drivers/media/i2c/ov9734.c +++ b/drivers/media/i2c/ov9734.c @@ -972,8 +972,8 @@ static int ov9734_probe(struct i2c_client *client) } static const struct acpi_device_id ov9734_acpi_ids[] = { - { "OVTI9734", }, - {} + { .id = "OVTI9734" }, + { } }; MODULE_DEVICE_TABLE(acpi, ov9734_acpi_ids); diff --git a/drivers/media/i2c/t4ka3.c b/drivers/media/i2c/t4ka3.c index 6506225683bb..187206178854 100644 --- a/drivers/media/i2c/t4ka3.c +++ b/drivers/media/i2c/t4ka3.c @@ -1043,8 +1043,8 @@ static int t4ka3_probe(struct i2c_client *client) } static const struct acpi_device_id t4ka3_acpi_match[] = { - { "XMCC0003" }, - {} + { .id = "XMCC0003" }, + { } }; MODULE_DEVICE_TABLE(acpi, t4ka3_acpi_match); -- 2.53.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 5/5] media: pci: intel: Use named initializers for acpi_device_id 2026-10-29 16:54 [PATCH 0/5] media: use designated initializers for acpi_device_id Pawel Zalewski ` (3 preceding siblings ...) 2026-10-29 16:54 ` [PATCH 4/5] media: i2c: " Pawel Zalewski @ 2026-10-29 16:54 ` Pawel Zalewski 4 siblings, 0 replies; 7+ messages in thread From: Pawel Zalewski @ 2026-10-29 16:54 UTC (permalink / raw) To: Ettore Chimenti, Hans Verkuil, Mauro Carvalho Chehab, Sakari Ailus, Miguel Vadillo, Antti Laakso, Hans de Goede, Laurent Pinchart, Bingbu Cao, Bryan O'Donoghue, Jimmy Su, Matthias Fend, Arec Kao, Rui Miguel Silva, Daniel Scally, Kate Hsuan Cc: linux-media, linux-kernel, Pawel Zalewski 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. Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> --- drivers/media/pci/intel/ipu-bridge.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/pci/intel/ipu-bridge.c b/drivers/media/pci/intel/ipu-bridge.c index 3739c4a2a8c4..31a0161e54ba 100644 --- a/drivers/media/pci/intel/ipu-bridge.c +++ b/drivers/media/pci/intel/ipu-bridge.c @@ -325,10 +325,10 @@ static const struct acpi_device_id ivsc_acpi_ids[] = { * this list is complete. */ static const struct acpi_device_id ivsc_only_acpi_ids[] = { - { "INTC1059" }, - { "INTC1095" }, - { "INTC100A" }, - { "INTC10CF" }, + { .id = "INTC1059" }, + { .id = "INTC1095" }, + { .id = "INTC100A" }, + { .id = "INTC10CF" }, { } }; -- 2.53.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-19 15:09 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2026-10-29 16:54 [PATCH 0/5] media: use designated initializers for acpi_device_id Pawel Zalewski 2026-10-29 16:54 ` [PATCH 1/5] media: cec: seco: Use named " Pawel Zalewski 2026-11-19 15:09 ` Mauro Carvalho Chehab 2026-10-29 16:54 ` [PATCH 2/5] media: i2c: ccs: Unify list terminator " Pawel Zalewski 2026-10-29 16:54 ` [PATCH 3/5] media: i2c: cvs: Use named initializers " Pawel Zalewski 2026-10-29 16:54 ` [PATCH 4/5] media: i2c: " Pawel Zalewski 2026-10-29 16:54 ` [PATCH 5/5] media: pci: intel: " Pawel Zalewski
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®