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 these arrays, unify usage of whitespace in the list
terminator.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Message-ID: <
20260519150156.
1590826-2-u.kleine-koenig@baylibre.com>
Signed-off-by: Corey Minyard <corey@minyard.net>
}
static const struct i2c_device_id ipmb_id[] = {
- { "ipmb-dev" },
- {}
+ { .name = "ipmb-dev" },
+ { }
};
MODULE_DEVICE_TABLE(i2c, ipmb_id);
#endif
static const struct i2c_device_id ipmi_ipmb_id[] = {
- { DEVICE_NAME },
- {}
+ { .name = DEVICE_NAME },
+ { }
};
MODULE_DEVICE_TABLE(i2c, ipmi_ipmb_id);
#endif
static const struct i2c_device_id ssif_id[] = {
- { DEVICE_NAME },
+ { .name = DEVICE_NAME },
{ }
};
MODULE_DEVICE_TABLE(i2c, ssif_id);
MODULE_DEVICE_TABLE(of, ssif_bmc_match);
static const struct i2c_device_id ssif_bmc_id[] = {
- { DEVICE_NAME },
+ { .name = DEVICE_NAME },
{ }
};
MODULE_DEVICE_TABLE(i2c, ssif_bmc_id);