mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 03:27:30 -04:00
mctp: i2c: Use named initializers for struct i2c_device_id
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. This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds. While touching this array, unify usage of whitespace in the list terminator to what most other arrays are using. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Acked-by: Jeremy Kerr <jk@codeconstruct.com.au> Link: https://patch.msgid.link/20260519153613.1594429-2-u.kleine-koenig@baylibre.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
e266427150
commit
0b87d2ab03
@@ -1101,8 +1101,8 @@ static struct notifier_block mctp_i2c_notifier = {
|
||||
};
|
||||
|
||||
static const struct i2c_device_id mctp_i2c_id[] = {
|
||||
{ "mctp-i2c-interface" },
|
||||
{}
|
||||
{ .name = "mctp-i2c-interface" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, mctp_i2c_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user