]> exis.tech > repos - linux.git/commit
Input: Use named initializers for arrays of i2c_device_data
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Fri, 15 May 2026 16:48:47 +0000 (18:48 +0200)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 31 May 2026 05:10:47 +0000 (22:10 -0700)
commit47ceab218c827cd5861bd1615763433a870a2d45
tree133ed4422b46df007aedc2cfebc8e87ea59d4b83
parentacaefbacc997ae79527a5ade8720221dfe17407e
Input: 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.

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/20260515164848.497608-2-u.kleine-koenig@baylibre.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
72 files changed:
drivers/input/joystick/adafruit-seesaw.c
drivers/input/joystick/as5011.c
drivers/input/joystick/qwiic-joystick.c
drivers/input/keyboard/adp5588-keys.c
drivers/input/keyboard/cap11xx.c
drivers/input/keyboard/cypress-sf.c
drivers/input/keyboard/dlink-dir685-touchkeys.c
drivers/input/keyboard/lm8323.c
drivers/input/keyboard/lm8333.c
drivers/input/keyboard/max7359_keypad.c
drivers/input/keyboard/mpr121_touchkey.c
drivers/input/keyboard/qt1070.c
drivers/input/keyboard/qt2160.c
drivers/input/keyboard/tca8418_keypad.c
drivers/input/keyboard/tm2-touchkey.c
drivers/input/misc/ad714x-i2c.c
drivers/input/misc/adxl34x-i2c.c
drivers/input/misc/apanel.c
drivers/input/misc/atmel_captouch.c
drivers/input/misc/bma150.c
drivers/input/misc/cma3000_d0x_i2c.c
drivers/input/misc/da7280.c
drivers/input/misc/drv260x.c
drivers/input/misc/drv2665.c
drivers/input/misc/drv2667.c
drivers/input/misc/kxtj9.c
drivers/input/misc/mma8450.c
drivers/input/misc/pcf8574_keypad.c
drivers/input/mouse/cyapa.c
drivers/input/mouse/elan_i2c_core.c
drivers/input/mouse/synaptics_i2c.c
drivers/input/rmi4/rmi_i2c.c
drivers/input/rmi4/rmi_smbus.c
drivers/input/touchscreen/ad7879-i2c.c
drivers/input/touchscreen/ar1021_i2c.c
drivers/input/touchscreen/atmel_mxt_ts.c
drivers/input/touchscreen/auo-pixcir-ts.c
drivers/input/touchscreen/bu21013_ts.c
drivers/input/touchscreen/bu21029_ts.c
drivers/input/touchscreen/cy8ctma140.c
drivers/input/touchscreen/cy8ctmg110_ts.c
drivers/input/touchscreen/cyttsp5.c
drivers/input/touchscreen/cyttsp_i2c.c
drivers/input/touchscreen/eeti_ts.c
drivers/input/touchscreen/egalax_ts.c
drivers/input/touchscreen/elants_i2c.c
drivers/input/touchscreen/exc3000.c
drivers/input/touchscreen/goodix.c
drivers/input/touchscreen/hideep.c
drivers/input/touchscreen/himax_hx83112b.c
drivers/input/touchscreen/hynitron-cst816x.c
drivers/input/touchscreen/ili210x.c
drivers/input/touchscreen/ilitek_ts_i2c.c
drivers/input/touchscreen/max11801_ts.c
drivers/input/touchscreen/melfas_mip4.c
drivers/input/touchscreen/migor_ts.c
drivers/input/touchscreen/mms114.c
drivers/input/touchscreen/novatek-nvt-ts.c
drivers/input/touchscreen/pixcir_i2c_ts.c
drivers/input/touchscreen/raydium_i2c_ts.c
drivers/input/touchscreen/rohm_bu21023.c
drivers/input/touchscreen/s6sy761.c
drivers/input/touchscreen/silead.c
drivers/input/touchscreen/sis_i2c.c
drivers/input/touchscreen/st1232.c
drivers/input/touchscreen/stmfts.c
drivers/input/touchscreen/tsc2004.c
drivers/input/touchscreen/tsc2007_core.c
drivers/input/touchscreen/wacom_i2c.c
drivers/input/touchscreen/wdt87xx_i2c.c
drivers/input/touchscreen/zet6223.c
drivers/input/touchscreen/zforce_ts.c