From: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
To: Lee Jones <lee@kernel.org>
Cc: Xu Yilun <yilun.xu@intel.com>, Tom Rix <trix@redhat.com>,
mfd@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH v3 12/23] mfd: intel-m10-bmc-pmci: Use named initializers for dfl_device_id array
Date: Thu, 9 Jul 2026 18:58:31 +0200 [thread overview]
Message-ID: <33ec4337624f50d718499d77a8481a6010fe7a7f.1783615311.git.u.kleine-koenig@baylibre.com> (raw)
In-Reply-To: <cover.1783615311.git.u.kleine-koenig@baylibre.com>
While being less compact, using named initializers allows to more easily
see which members of the structs are assigned which value without having
to lookup the declaration of the struct. And it's also more robust
against changes to the struct definition.
The mentioned robustness is relevant for a planned change to struct
dfl_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) <u.kleine-koenig@baylibre.com>
---
drivers/mfd/intel-m10-bmc-pmci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mfd/intel-m10-bmc-pmci.c b/drivers/mfd/intel-m10-bmc-pmci.c
index d213c6ec04ba..f78309bbabfd 100644
--- a/drivers/mfd/intel-m10-bmc-pmci.c
+++ b/drivers/mfd/intel-m10-bmc-pmci.c
@@ -434,7 +434,7 @@ static void m10bmc_pmci_remove(struct dfl_device *ddev)
#define FME_FEATURE_ID_M10BMC_PMCI 0x12
static const struct dfl_device_id m10bmc_pmci_ids[] = {
- { FME_ID, FME_FEATURE_ID_M10BMC_PMCI },
+ { .type = FME_ID, .feature_id = FME_FEATURE_ID_M10BMC_PMCI },
{ }
};
MODULE_DEVICE_TABLE(dfl, m10bmc_pmci_ids);
--
2.55.0.11.g153666a7d9bb
next prev parent reply other threads:[~2026-07-09 17:00 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 16:58 [PATCH v3 00/23] mfd: Use named initializers for arrays of *_device_data Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 01/23] mfd: bcm2835-pm: Remove member of struct bcm2835_pm that is only used locally Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 02/23] mfd: bcm2835-pm: Drop unused header Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 03/23] mfd: kempld: Simplify device abstraction Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 04/23] mfd: lp87565: Explicitly set driver data for the generic dt compatible Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 05/23] mfd: mt6360: Drop irrelevant __maybe_unused Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 06/23] mfd: rt4831: " Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 07/23] mfd: loongson-se: Drop unused assignment of acpi_device_id driver data Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 08/23] mfd: Drop unused assignment of i2c_device_id " Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 09/23] mfd: Drop unused assignment of platform_device_id " Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 10/23] mfd: Drop unused assignment of spi_device_id " Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 11/23] mfd: Use named initializers for acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` Uwe Kleine-König (The Capable Hub) [this message]
2026-07-09 16:58 ` [PATCH v3 13/23] mfd: Use named initializers for arrays of i2c_device_id Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 14/23] mfd: twl6030: Use named initializers for of_device_id Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 15/23] mfd: Use PCI_DEVICE* macros to initialize pci_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 16/23] mfd: Use named initializers for platform_device_id array Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 17/23] mfd: Use named initializers for arrays of spi_device_id Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 18/23] mfd: Unify style of acpi_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 19/23] mfd: Unify style of dmi_system_id arrays Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 20/23] mfd: Unify style of i2c_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 21/23] mfd: Unify style of of_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-07-10 10:21 ` Geert Uytterhoeven
2026-07-10 13:00 ` Mathieu Dubois-Briand
2026-07-10 13:15 ` Krzysztof Kozlowski
2026-07-10 16:54 ` Charles Keepax
2026-07-09 16:58 ` [PATCH v3 22/23] mfd: Unify style of pci_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-07-09 16:58 ` [PATCH v3 23/23] mfd: Unify style of spi_device_id arrays Uwe Kleine-König (The Capable Hub)
2026-07-10 19:45 ` [PATCH v3 00/23] mfd: Use named initializers for arrays of *_device_data Linus Walleij
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=33ec4337624f50d718499d77a8481a6010fe7a7f.1783615311.git.u.kleine-koenig@baylibre.com \
--to=u.kleine-koenig@baylibre.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mfd@lists.linux.dev \
--cc=trix@redhat.com \
--cc=yilun.xu@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox