]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: typec: Use named initializers for arrays of i2c_device_data
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Mon, 18 May 2026 11:01:42 +0000 (13:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 May 2026 14:52:31 +0000 (16:52 +0200)
commit52be520ca9efd41d5fb06b172489c13ceb68dbc0
tree0be4ad266a18a6ecd6cbda8ddbb4c6cd571460ba
parent84d2b46ec18ac897cf39ea4b51d085df5e2f4bf4
usb: typec: 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>
Link: https://patch.msgid.link/20260518110142.637215-2-u.kleine-koenig@baylibre.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14 files changed:
drivers/usb/typec/anx7411.c
drivers/usb/typec/mux/fsa4480.c
drivers/usb/typec/mux/it5205.c
drivers/usb/typec/mux/nb7vpq904m.c
drivers/usb/typec/mux/pi3usb30532.c
drivers/usb/typec/mux/ptn36502.c
drivers/usb/typec/mux/wcd939x-usbss.c
drivers/usb/typec/tcpm/fusb302.c
drivers/usb/typec/tcpm/tcpci.c
drivers/usb/typec/tcpm/tcpci_maxim_core.c
drivers/usb/typec/tcpm/tcpci_rt1711h.c
drivers/usb/typec/tipd/core.c
drivers/usb/typec/ucsi/ucsi_ccg.c
drivers/usb/typec/ucsi/ucsi_stm32g0.c