]> git.ipfire.org Git - thirdparty/linux.git/commit
platform/chrome: Use named initializers for struct i2c_device_id
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Tue, 19 May 2026 15:08:18 +0000 (17:08 +0200)
committerTzung-Bi Shih <tzungbi@kernel.org>
Wed, 20 May 2026 04:18:38 +0000 (04:18 +0000)
commitace8ee71e8ef4d6ef5a6501469df95237e1f7406
tree5b20ba97fcdf96f8aa53f1c351bf72c23c82db26
parent51dcff9796fd486d7abf01081ca62e4072789e9d
platform/chrome: 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.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20260519150819.1591409-2-u.kleine-koenig@baylibre.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
drivers/platform/chrome/cros_ec_i2c.c
drivers/platform/chrome/cros_hps_i2c.c