[PATCH v3 14/23] mfd: twl6030: Use named initializers for of_device_id
Uwe Kleine-König (The Capable Hub) <[email protected]> Thu, 9 Jul 2026 18:58:33 +0200
| Newsgroups | org.kernel.vger.linux-omap,dev.linux.lists.mfd,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <7be6ef143f760ef6ccec4d6427a471d3b4c0a71e.1783615311.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