diff options
| author | Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> | 2026-06-30 16:01:08 +0200 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-06-30 23:40:20 +0100 |
| commit | 8e74b2db58671c27809dcea9c0eb9143424f2ca8 (patch) | |
| tree | 643ab05d6b2f140336f156a666e8fbeaf0a68baf /drivers/regulator/max8649.c | |
| parent | 3ac69e3cb2880042a488fea68eddd2835499582b (diff) | |
| download | linux-next-8e74b2db58671c27809dcea9c0eb9143424f2ca8.tar.gz linux-next-8e74b2db58671c27809dcea9c0eb9143424f2ca8.zip | |
regulator: Use named initializers for arrays of i2c_device_data
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
i2c_device_id that replaces .driver_data by an anonymous union.
While touching all these arrays, unify usage of whitespace and commas.
This patch doesn't modify the compiled arrays, only their representation
in source form benefits. The former was confirmed with x86 and arm64
builds.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/2e83a9747ac2c92db8f91fd0e0eb311c4efe8e73.1782827697.git.u.kleine-koenig@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/max8649.c')
| -rw-r--r-- | drivers/regulator/max8649.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c index f57c588bcf28..2d17405242e7 100644 --- a/drivers/regulator/max8649.c +++ b/drivers/regulator/max8649.c @@ -240,7 +240,7 @@ static int max8649_regulator_probe(struct i2c_client *client) } static const struct i2c_device_id max8649_id[] = { - { "max8649" }, + { .name = "max8649" }, { } }; MODULE_DEVICE_TABLE(i2c, max8649_id); |
