* [PATCH v1] i2c: pxa: Use named initializers for the platform_device_id array
@ 2026-06-17 9:37 Uwe Kleine-König (The Capable Hub)
2026-06-18 11:14 ` Andi Shyti
0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-06-17 9:37 UTC (permalink / raw)
To: Andi Shyti; +Cc: linux-i2c, linux-kernel
Named initializers are better readable and more robust to changes of the
struct definition. This robustness is relevant for a planned change to
struct platform_device_id replacing .driver_data by an anonymous union.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
---
Hello,
this is a preparating patch that is needed before making struct
platform_device_id's .driver_data a union. This is similar to the patch
quest outlined in https://lore.kernel.org/linux-i2c/20260504142639.2119645-2-u.kleine-koenig@baylibre.com/
.
Best regards
Uwe
drivers/i2c/busses/i2c-pxa.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 9a8b154ab69e..c9927a389aaf 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -214,11 +214,11 @@ static const struct of_device_id i2c_pxa_dt_ids[] = {
MODULE_DEVICE_TABLE(of, i2c_pxa_dt_ids);
static const struct platform_device_id i2c_pxa_id_table[] = {
- { "pxa2xx-i2c", REGS_PXA2XX },
- { "pxa3xx-pwri2c", REGS_PXA3XX },
- { "ce4100-i2c", REGS_CE4100 },
- { "pxa910-i2c", REGS_PXA910 },
- { "armada-3700-i2c", REGS_A3700 },
+ { .name = "pxa2xx-i2c", .driver_data = REGS_PXA2XX },
+ { .name = "pxa3xx-pwri2c", .driver_data = REGS_PXA3XX },
+ { .name = "ce4100-i2c", .driver_data = REGS_CE4100 },
+ { .name = "pxa910-i2c", .driver_data = REGS_PXA910 },
+ { .name = "armada-3700-i2c", .driver_data = REGS_A3700 },
{ }
};
MODULE_DEVICE_TABLE(platform, i2c_pxa_id_table);
base-commit: 4fa3f5fabb30bf00d7475d5a33459ea83d639bf9
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v1] i2c: pxa: Use named initializers for the platform_device_id array
2026-06-17 9:37 [PATCH v1] i2c: pxa: Use named initializers for the platform_device_id array Uwe Kleine-König (The Capable Hub)
@ 2026-06-18 11:14 ` Andi Shyti
2026-06-18 12:24 ` Uwe Kleine-König (The Capable Hub)
0 siblings, 1 reply; 4+ messages in thread
From: Andi Shyti @ 2026-06-18 11:14 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub); +Cc: linux-i2c, linux-kernel
Hi Uwe,
On Wed, Jun 17, 2026 at 11:37:36AM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> Named initializers are better readable and more robust to changes of the
> struct definition. This robustness is relevant for a planned change to
> struct platform_device_id replacing .driver_data by an anonymous union.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
I had decided not to take any patch anymore for this cycle, but
because this is part of a bigger work you've done, I will squeeze
it in.
Merged to i2c/i2c-host.
Thanks,
Andi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] i2c: pxa: Use named initializers for the platform_device_id array
2026-06-18 11:14 ` Andi Shyti
@ 2026-06-18 12:24 ` Uwe Kleine-König (The Capable Hub)
2026-06-18 14:18 ` Andi Shyti
0 siblings, 1 reply; 4+ messages in thread
From: Uwe Kleine-König (The Capable Hub) @ 2026-06-18 12:24 UTC (permalink / raw)
To: Andi Shyti; +Cc: linux-i2c, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 960 bytes --]
On Thu, Jun 18, 2026 at 01:14:04PM +0200, Andi Shyti wrote:
> Hi Uwe,
>
> On Wed, Jun 17, 2026 at 11:37:36AM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> > Named initializers are better readable and more robust to changes of the
> > struct definition. This robustness is relevant for a planned change to
> > struct platform_device_id replacing .driver_data by an anonymous union.
> >
> > Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
>
> I had decided not to take any patch anymore for this cycle, but
> because this is part of a bigger work you've done, I will squeeze
> it in.
>
> Merged to i2c/i2c-host.
Thanks. If you want to rethink that's fine. There are still so many
patches pending (to be applied and to be sent) that there is little
sense in rushing in that one. I'm happy if you take it now, but if you
reschedule it to the next merge window, that's fine for me, too.
Thanks
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] i2c: pxa: Use named initializers for the platform_device_id array
2026-06-18 12:24 ` Uwe Kleine-König (The Capable Hub)
@ 2026-06-18 14:18 ` Andi Shyti
0 siblings, 0 replies; 4+ messages in thread
From: Andi Shyti @ 2026-06-18 14:18 UTC (permalink / raw)
To: Uwe Kleine-König (The Capable Hub); +Cc: linux-i2c, linux-kernel
Hi Uwe,
On Thu, Jun 18, 2026 at 02:24:25PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> On Thu, Jun 18, 2026 at 01:14:04PM +0200, Andi Shyti wrote:
> > On Wed, Jun 17, 2026 at 11:37:36AM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> > > Named initializers are better readable and more robust to changes of the
> > > struct definition. This robustness is relevant for a planned change to
> > > struct platform_device_id replacing .driver_data by an anonymous union.
> > >
> > > Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> >
> > I had decided not to take any patch anymore for this cycle, but
> > because this is part of a bigger work you've done, I will squeeze
> > it in.
> >
> > Merged to i2c/i2c-host.
>
> Thanks. If you want to rethink that's fine. There are still so many
> patches pending (to be applied and to be sent) that there is little
> sense in rushing in that one. I'm happy if you take it now, but if you
> reschedule it to the next merge window, that's fine for me, too.
It's OK, I will keep it, it makes sense to add it to the similar
patche that have been merged already.
Andi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-18 14:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-17 9:37 [PATCH v1] i2c: pxa: Use named initializers for the platform_device_id array Uwe Kleine-König (The Capable Hub)
2026-06-18 11:14 ` Andi Shyti
2026-06-18 12:24 ` Uwe Kleine-König (The Capable Hub)
2026-06-18 14:18 ` Andi Shyti
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.