]> git.ipfire.org Git - thirdparty/linux.git/commit
pinctrl: Use named initializers for arrays of i2c_device_data
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Sun, 17 May 2026 13:48:35 +0000 (15:48 +0200)
committerLinus Walleij <linusw@kernel.org>
Wed, 10 Jun 2026 21:21:19 +0000 (23:21 +0200)
commit84c0fe4a2085f424fe672a296056c8baf6cfb977
treea5eba535037685e8f7ed14dd0f4f89c835ab75a9
parentd798af0a0f271e6d1e000e9fed579d25317091c3
pinctrl: 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 in the list
terminator.

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>
Signed-off-by: Linus Walleij <linusw@kernel.org>
drivers/pinctrl/pinctrl-aw9523.c
drivers/pinctrl/pinctrl-cy8c95x0.c
drivers/pinctrl/pinctrl-mcp23s08_i2c.c
drivers/pinctrl/pinctrl-sx150x.c