[PATCH v2 14/23] mfd: twl6030: Use named initializers for of_device_id
Uwe Kleine-König (The Capable Hub) <[email protected]> Wed, 8 Jul 2026 13:15:21 +0200
| Newsgroups | org.kernel.vger.linux-omap,dev.linux.lists.mfd,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <3286c57c088c69d4c9296f66bb8e17bae8824b93.1783507945.git.u.kleine-koenig@baylibre.com> |
For .compatible a named initializer was already used, unify by also doing that for the .data member. This is easier readable for a human and more robust against changes to the struct definition. This robustness is relevant for a planned change to struct of_device_id that replaces .driver_data by an anonymous union. This patch doesn't modify the compiled array, only its representation in source form benefits. Signed-off-by: Uwe Kleine-König (The Capable Hub) <[email protected]> --- drivers/mfd/twl6030-irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c index 0ca00f618d4d..4303fb288dd5 100644 --- a/drivers/mfd/twl6030-irq.c +++ b/drivers/mfd/twl6030-irq.c @@ -283,8 +283,8 @@ static const struct irq_domain_ops twl6030_irq_domain_ops = { }; static const struct of_device_id twl6030_of_match[] __maybe_unused = { - {.compatible = "ti,twl6030", &twl6030_interrupt_mapping}, - {.compatible = "ti,twl6032", &twl6032_interrupt_mapping}, + { .compatible = "ti,twl6030", .data = &twl6030_interrupt_mapping }, + { .compatible = "ti,twl6032", .data = &twl6032_interrupt_mapping }, { }, }; -- 2.55.0.11.g153666a7d9bb