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)
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

index c248c15..5835ed1 100644 (file)
@@ -304,7 +304,7 @@ static int seesaw_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id seesaw_id_table[] = {
-       { SEESAW_DEVICE_NAME },
+       { .name = SEESAW_DEVICE_NAME },
        { /* Sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, seesaw_id_table);
index 7b4d616..5fca92b 100644 (file)
@@ -337,7 +337,7 @@ static void as5011_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id as5011_id[] = {
-       { MODULE_DEVICE_ALIAS },
+       { .name = MODULE_DEVICE_ALIAS },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, as5011_id);
index 6f989d0..c471afc 100644 (file)
@@ -126,7 +126,7 @@ MODULE_DEVICE_TABLE(of, of_qwiic_match);
 #endif /* CONFIG_OF */
 
 static const struct i2c_device_id qwiic_id_table[] = {
-       { KBUILD_MODNAME },
+       { .name = KBUILD_MODNAME },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, qwiic_id_table);
index 414fbef..8d14d0f 100644 (file)
@@ -842,8 +842,8 @@ static int adp5588_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(adp5588_dev_pm_ops, adp5588_suspend, adp5588_resume);
 
 static const struct i2c_device_id adp5588_id[] = {
-       { "adp5588-keys" },
-       { "adp5587-keys" },
+       { .name = "adp5588-keys" },
+       { .name = "adp5587-keys" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, adp5588_id);
index 0c17cba..2447c1a 100644 (file)
@@ -651,13 +651,13 @@ static const struct of_device_id cap11xx_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, cap11xx_dt_ids);
 
 static const struct i2c_device_id cap11xx_i2c_ids[] = {
-       { "cap1106", (kernel_ulong_t)&cap1106_model },
-       { "cap1126", (kernel_ulong_t)&cap1126_model },
-       { "cap1188", (kernel_ulong_t)&cap1188_model },
-       { "cap1203", (kernel_ulong_t)&cap1203_model },
-       { "cap1206", (kernel_ulong_t)&cap1206_model },
-       { "cap1293", (kernel_ulong_t)&cap1293_model },
-       { "cap1298", (kernel_ulong_t)&cap1298_model },
+       { .name = "cap1106", .driver_data = (kernel_ulong_t)&cap1106_model },
+       { .name = "cap1126", .driver_data = (kernel_ulong_t)&cap1126_model },
+       { .name = "cap1188", .driver_data = (kernel_ulong_t)&cap1188_model },
+       { .name = "cap1203", .driver_data = (kernel_ulong_t)&cap1203_model },
+       { .name = "cap1206", .driver_data = (kernel_ulong_t)&cap1206_model },
+       { .name = "cap1293", .driver_data = (kernel_ulong_t)&cap1293_model },
+       { .name = "cap1298", .driver_data = (kernel_ulong_t)&cap1298_model },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, cap11xx_i2c_ids);
index 335b72e..4b2ae07 100644 (file)
@@ -209,7 +209,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(cypress_sf_pm_ops,
                                cypress_sf_suspend, cypress_sf_resume);
 
 static const struct i2c_device_id cypress_sf_id_table[] = {
-       { CYPRESS_SF_DEV_NAME },
+       { .name = CYPRESS_SF_DEV_NAME },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, cypress_sf_id_table);
index 4184dd2..bf94367 100644 (file)
@@ -128,7 +128,7 @@ static int dir685_tk_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id dir685_tk_id[] = {
-       { "dir685tk" },
+       { .name = "dir685tk" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, dir685_tk_id);
index d9df104..8eac63b 100644 (file)
@@ -788,7 +788,7 @@ static int lm8323_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(lm8323_pm_ops, lm8323_suspend, lm8323_resume);
 
 static const struct i2c_device_id lm8323_id[] = {
-       { "lm8323" },
+       { .name = "lm8323" },
        { }
 };
 
index 384baab..34be5b2 100644 (file)
@@ -194,7 +194,7 @@ static int lm8333_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lm8333_id[] = {
-       { "lm8333" },
+       { .name = "lm8333" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lm8333_id);
index c10726b..f8fb44b 100644 (file)
@@ -270,7 +270,7 @@ static int max7359_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(max7359_pm, max7359_suspend, max7359_resume);
 
 static const struct i2c_device_id max7359_ids[] = {
-       { "max7359" },
+       { .name = "max7359" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, max7359_ids);
index 47edc16..a1a1028 100644 (file)
@@ -322,7 +322,7 @@ static int mpr_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(mpr121_touchkey_pm_ops, mpr_suspend, mpr_resume);
 
 static const struct i2c_device_id mpr121_id[] = {
-       { "mpr121_touchkey" },
+       { .name = "mpr121_touchkey" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, mpr121_id);
index b255b99..e31cb11 100644 (file)
@@ -233,7 +233,7 @@ static int qt1070_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(qt1070_pm_ops, qt1070_suspend, qt1070_resume);
 
 static const struct i2c_device_id qt1070_id[] = {
-       { "qt1070" },
+       { .name = "qt1070" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, qt1070_id);
index 53f5255..e64adac 100644 (file)
@@ -393,7 +393,7 @@ static int qt2160_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id qt2160_idtable[] = {
-       { "qt2160" },
+       { .name = "qt2160" },
        { }
 };
 
index 68c0afa..eb5be64 100644 (file)
@@ -354,7 +354,7 @@ static int tca8418_keypad_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tca8418_id[] = {
-       { "tca8418", 8418, },
+       { .name = "tca8418", .driver_data = 8418 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, tca8418_id);
index 55d699d..967bbe5 100644 (file)
@@ -326,7 +326,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(tm2_touchkey_pm_ops,
                                tm2_touchkey_suspend, tm2_touchkey_resume);
 
 static const struct i2c_device_id tm2_touchkey_id_table[] = {
-       { TM2_TOUCHKEY_DEV_NAME },
+       { .name = TM2_TOUCHKEY_DEV_NAME },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, tm2_touchkey_id_table);
index 2adb7a0..c3cb561 100644 (file)
@@ -72,11 +72,11 @@ static int ad714x_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ad714x_id[] = {
-       { "ad7142_captouch" },
-       { "ad7143_captouch" },
-       { "ad7147_captouch" },
-       { "ad7147a_captouch" },
-       { "ad7148_captouch" },
+       { .name = "ad7142_captouch" },
+       { .name = "ad7143_captouch" },
+       { .name = "ad7147_captouch" },
+       { .name = "ad7147a_captouch" },
+       { .name = "ad7148_captouch" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ad714x_id);
index 5ea0ce4..84665c6 100644 (file)
@@ -96,7 +96,7 @@ static int adxl34x_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id adxl34x_id[] = {
-       { "adxl34x" },
+       { .name = "adxl34x" },
        { }
 };
 
index d43aebd..3eb02a6 100644 (file)
@@ -192,7 +192,7 @@ static void apanel_shutdown(struct i2c_client *client)
 }
 
 static const struct i2c_device_id apanel_id[] = {
-       { "fujitsu_apanel" },
+       { .name = "fujitsu_apanel" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, apanel_id);
index f9744cf..fc4abea 100644 (file)
@@ -257,7 +257,7 @@ static const struct of_device_id atmel_captouch_of_id[] = {
 MODULE_DEVICE_TABLE(of, atmel_captouch_of_id);
 
 static const struct i2c_device_id atmel_captouch_id[] = {
-       { "atmel_captouch" },
+       { .name = "atmel_captouch" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, atmel_captouch_id);
index 4cc2a0d..0ef2829 100644 (file)
@@ -536,9 +536,9 @@ static int __maybe_unused bma150_resume(struct device *dev)
 static UNIVERSAL_DEV_PM_OPS(bma150_pm, bma150_suspend, bma150_resume, NULL);
 
 static const struct i2c_device_id bma150_id[] = {
-       { "bma150" },
-       { "smb380" },
-       { "bma023" },
+       { .name = "bma150" },
+       { .name = "smb380" },
+       { .name = "bma023" },
        { }
 };
 
index f892c5b..14be6d4 100644 (file)
@@ -90,7 +90,7 @@ static const struct dev_pm_ops cma3000_i2c_pm_ops = {
 };
 
 static const struct i2c_device_id cma3000_i2c_id[] = {
-       { "cma3000_d01" },
+       { .name = "cma3000_d01" },
        { }
 };
 
index e4a605c..77fcf86 100644 (file)
@@ -1305,7 +1305,7 @@ MODULE_DEVICE_TABLE(of, da7280_of_match);
 #endif
 
 static const struct i2c_device_id da7280_i2c_id[] = {
-       { "da7280", },
+       { .name = "da7280" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, da7280_i2c_id);
index e2089d6..6c5c4c5 100644 (file)
@@ -630,10 +630,10 @@ static int drv260x_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(drv260x_pm_ops, drv260x_suspend, drv260x_resume);
 
 static const struct i2c_device_id drv260x_id[] = {
-       { "drv2604" },
-       { "drv2604l" },
-       { "drv2605" },
-       { "drv2605l" },
+       { .name = "drv2604" },
+       { .name = "drv2604l" },
+       { .name = "drv2605" },
+       { .name = "drv2605l" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, drv260x_id);
index 46842cb..4f8c1f6 100644 (file)
@@ -281,7 +281,7 @@ static int drv2665_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(drv2665_pm_ops, drv2665_suspend, drv2665_resume);
 
 static const struct i2c_device_id drv2665_id[] = {
-       { "drv2665" },
+       { .name = "drv2665" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, drv2665_id);
index f952a24..9730998 100644 (file)
@@ -458,7 +458,7 @@ static int drv2667_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(drv2667_pm_ops, drv2667_suspend, drv2667_resume);
 
 static const struct i2c_device_id drv2667_id[] = {
-       { "drv2667" },
+       { .name = "drv2667" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, drv2667_id);
index eb9788e..6b3495b 100644 (file)
@@ -525,7 +525,7 @@ static int kxtj9_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(kxtj9_pm_ops, kxtj9_suspend, kxtj9_resume);
 
 static const struct i2c_device_id kxtj9_id[] = {
-       { NAME },
+       { .name = NAME },
        { }
 };
 
index 0c66114..a2888d1 100644 (file)
@@ -200,7 +200,7 @@ static int mma8450_probe(struct i2c_client *c)
 }
 
 static const struct i2c_device_id mma8450_id[] = {
-       { MMA8450_DRV_NAME },
+       { .name = MMA8450_DRV_NAME },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, mma8450_id);
index 14fc6c6..a831fcc 100644 (file)
@@ -189,7 +189,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(pcf8574_kp_pm_ops,
                                pcf8574_kp_suspend, pcf8574_kp_resume);
 
 static const struct i2c_device_id pcf8574_kp_id[] = {
-       { DRV_NAME },
+       { .name = DRV_NAME },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, pcf8574_kp_id);
index 6e0d956..47000c3 100644 (file)
@@ -1456,7 +1456,7 @@ static const struct dev_pm_ops cyapa_pm_ops = {
 };
 
 static const struct i2c_device_id cyapa_id_table[] = {
-       { "cyapa" },
+       { .name = "cyapa" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, cyapa_id_table);
index fee1796..294e775 100644 (file)
@@ -1399,7 +1399,7 @@ err:
 static DEFINE_SIMPLE_DEV_PM_OPS(elan_pm_ops, elan_suspend, elan_resume);
 
 static const struct i2c_device_id elan_id[] = {
-       { DRIVER_NAME },
+       { .name = DRIVER_NAME },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, elan_id);
index 6f3d5c3..d4cf982 100644 (file)
@@ -607,7 +607,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(synaptics_i2c_pm, synaptics_i2c_suspend,
                                synaptics_i2c_resume);
 
 static const struct i2c_device_id synaptics_i2c_id_table[] = {
-       { "synaptics_i2c" },
+       { .name = "synaptics_i2c" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, synaptics_i2c_id_table);
index 3c0c5fd..e11d0ac 100644 (file)
@@ -365,7 +365,7 @@ static const struct dev_pm_ops rmi_i2c_pm = {
 };
 
 static const struct i2c_device_id rmi_id[] = {
-       { "rmi4_i2c" },
+       { .name = "rmi4_i2c" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, rmi_id);
index f3d0b40..6de68c6 100644 (file)
@@ -413,7 +413,7 @@ static const struct dev_pm_ops rmi_smb_pm = {
 };
 
 static const struct i2c_device_id rmi_id[] = {
-       { "rmi4_smbus" },
+       { .name = "rmi4_smbus" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, rmi_id);
index e5b9931..c1ccdf8 100644 (file)
@@ -42,8 +42,8 @@ static int ad7879_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ad7879_id[] = {
-       { "ad7879" },
-       { "ad7889" },
+       { .name = "ad7879" },
+       { .name = "ad7889" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ad7879_id);
index 8a58820..aa43fc1 100644 (file)
@@ -164,7 +164,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(ar1021_i2c_pm,
                                ar1021_i2c_suspend, ar1021_i2c_resume);
 
 static const struct i2c_device_id ar1021_i2c_id[] = {
-       { "ar1021" },
+       { .name = "ar1021" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ar1021_i2c_id);
index a9e86ad..74de06e 100644 (file)
@@ -3410,11 +3410,11 @@ MODULE_DEVICE_TABLE(acpi, mxt_acpi_id);
 #endif
 
 static const struct i2c_device_id mxt_id[] = {
-       { "qt602240_ts" },
-       { "atmel_mxt_ts" },
-       { "atmel_mxt_tp" },
-       { "maxtouch" },
-       { "mXT224" },
+       { .name = "qt602240_ts" },
+       { .name = "atmel_mxt_ts" },
+       { .name = "atmel_mxt_tp" },
+       { .name = "maxtouch" },
+       { .name = "mXT224" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, mxt_id);
index 401b226..6c6ebeb 100644 (file)
@@ -618,7 +618,7 @@ static int auo_pixcir_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id auo_pixcir_idtable[] = {
-       { "auo_pixcir_ts" },
+       { .name = "auo_pixcir_ts" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, auo_pixcir_idtable);
index 6baebb7..d1bdccc 100644 (file)
@@ -597,7 +597,7 @@ static int bu21013_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(bu21013_dev_pm_ops, bu21013_suspend, bu21013_resume);
 
 static const struct i2c_device_id bu21013_id[] = {
-       { DRIVER_TP },
+       { .name = DRIVER_TP },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, bu21013_id);
index 68d9cd5..339fee1 100644 (file)
@@ -442,7 +442,7 @@ static int bu21029_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(bu21029_pm_ops, bu21029_suspend, bu21029_resume);
 
 static const struct i2c_device_id bu21029_ids[] = {
-       { DRIVER_NAME },
+       { .name = DRIVER_NAME },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, bu21029_ids);
index 2d4b6e3..0ac48ef 100644 (file)
@@ -322,7 +322,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(cy8ctma140_pm,
                                cy8ctma140_suspend, cy8ctma140_resume);
 
 static const struct i2c_device_id cy8ctma140_idtable[] = {
-       { CY8CTMA140_NAME },
+       { .name = CY8CTMA140_NAME },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, cy8ctma140_idtable);
index 54d6c48..33ad4f0 100644 (file)
@@ -267,7 +267,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(cy8ctmg110_pm,
                                cy8ctmg110_suspend, cy8ctmg110_resume);
 
 static const struct i2c_device_id cy8ctmg110_idtable[] = {
-       { CY8CTMG110_DRIVER_NAME, 1 },
+       { .name = CY8CTMG110_DRIVER_NAME, .driver_data = 1 },
        { }
 };
 
index 47f4271..73c397e 100644 (file)
@@ -938,7 +938,7 @@ static const struct of_device_id cyttsp5_of_match[] = {
 MODULE_DEVICE_TABLE(of, cyttsp5_of_match);
 
 static const struct i2c_device_id cyttsp5_i2c_id[] = {
-       { CYTTSP5_NAME },
+       { .name = CYTTSP5_NAME },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, cyttsp5_i2c_id);
index cb15600..17524f7 100644 (file)
@@ -103,7 +103,7 @@ static int cyttsp_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id cyttsp_i2c_id[] = {
-       { CY_I2C_NAME },
+       { .name = CY_I2C_NAME },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, cyttsp_i2c_id);
index 492e19a..b12602b 100644 (file)
@@ -266,7 +266,7 @@ static int eeti_ts_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(eeti_ts_pm, eeti_ts_suspend, eeti_ts_resume);
 
 static const struct i2c_device_id eeti_ts_id[] = {
-       { "eeti_ts" },
+       { .name = "eeti_ts" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, eeti_ts_id);
index eb3cc2b..76cf808 100644 (file)
@@ -219,7 +219,7 @@ static int egalax_ts_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id egalax_ts_id[] = {
-       { "egalax_ts" },
+       { .name = "egalax_ts" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, egalax_ts_id);
index 835d91d..17175ad 100644 (file)
@@ -1615,9 +1615,9 @@ static DEFINE_SIMPLE_DEV_PM_OPS(elants_i2c_pm_ops,
                                elants_i2c_suspend, elants_i2c_resume);
 
 static const struct i2c_device_id elants_i2c_id[] = {
-       { DEVICE_NAME, EKTH3500 },
-       { "ekth3500", EKTH3500 },
-       { "ektf3624", EKTF3624 },
+       { .name = DEVICE_NAME, .driver_data = EKTH3500 },
+       { .name = "ekth3500", .driver_data = EKTH3500 },
+       { .name = "ektf3624", .driver_data = EKTF3624 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, elants_i2c_id);
index 78c0911..037bb35 100644 (file)
@@ -432,10 +432,10 @@ static int exc3000_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id exc3000_id[] = {
-       { "exc3000", EETI_EXC3000 },
-       { "exc80h60", EETI_EXC80H60 },
-       { "exc80h84", EETI_EXC80H84 },
-       { "exc81w32", EETI_EXC81W32 },
+       { .name = "exc3000", .driver_data = EETI_EXC3000 },
+       { .name = "exc80h60", .driver_data = EETI_EXC80H60 },
+       { .name = "exc80h84", .driver_data = EETI_EXC80H84 },
+       { .name = "exc81w32", .driver_data = EETI_EXC81W32 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, exc3000_id);
index f8798d1..2c48ad8 100644 (file)
@@ -1523,7 +1523,7 @@ static int goodix_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(goodix_pm_ops, goodix_suspend, goodix_resume);
 
 static const struct i2c_device_id goodix_ts_id[] = {
-       { "GDIX1001:00" },
+       { .name = "GDIX1001:00" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, goodix_ts_id);
index 62041bc..58e00c3 100644 (file)
@@ -1081,7 +1081,7 @@ static int hideep_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id hideep_i2c_id[] = {
-       { HIDEEP_I2C_NAME },
+       { .name = HIDEEP_I2C_NAME },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, hideep_i2c_id);
index 896a145..0aa67df 100644 (file)
@@ -406,8 +406,8 @@ static const struct himax_chip hx83112b_chip = {
 };
 
 static const struct i2c_device_id himax_ts_id[] = {
-       { "hx83100a", (kernel_ulong_t)&hx83100a_chip },
-       { "hx83112b", (kernel_ulong_t)&hx83112b_chip },
+       { .name = "hx83100a", .driver_data = (kernel_ulong_t)&hx83100a_chip },
+       { .name = "hx83112b", .driver_data = (kernel_ulong_t)&hx83112b_chip },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, himax_ts_id);
index b64d792..47d9cd7 100644 (file)
@@ -226,7 +226,7 @@ static int cst816x_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id cst816x_id[] = {
-       { .name = "cst816s", 0 },
+       { .name = "cst816s" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, cst816x_id);
index 3bf524a..66ada7f 100644 (file)
@@ -1049,10 +1049,10 @@ static int ili210x_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ili210x_i2c_id[] = {
-       { "ili210x", (long)&ili210x_chip },
-       { "ili2117", (long)&ili211x_chip },
-       { "ili2120", (long)&ili212x_chip },
-       { "ili251x", (long)&ili251x_chip },
+       { .name = "ili210x", .driver_data = (long)&ili210x_chip },
+       { .name = "ili2117", .driver_data = (long)&ili211x_chip },
+       { .name = "ili2120", .driver_data = (long)&ili212x_chip },
+       { .name = "ili251x", .driver_data = (long)&ili251x_chip },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ili210x_i2c_id);
index 0706443..3de0fbf 100644 (file)
@@ -639,7 +639,7 @@ static int ilitek_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(ilitek_pm_ops, ilitek_suspend, ilitek_resume);
 
 static const struct i2c_device_id ilitek_ts_i2c_id[] = {
-       { ILITEK_TS_NAME },
+       { .name = ILITEK_TS_NAME },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ilitek_ts_i2c_id);
index f39633f..3996e4a 100644 (file)
@@ -213,7 +213,7 @@ static int max11801_ts_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id max11801_ts_id[] = {
-       { "max11801" },
+       { .name = "max11801" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, max11801_ts_id);
index 10fccf4..fd6c0ac 100644 (file)
@@ -1536,7 +1536,7 @@ MODULE_DEVICE_TABLE(acpi, mip4_acpi_match);
 #endif
 
 static const struct i2c_device_id mip4_i2c_ids[] = {
-       { MIP4_DEVICE_NAME },
+       { .name = MIP4_DEVICE_NAME },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, mip4_i2c_ids);
index 993d945..9d221e3 100644 (file)
@@ -211,7 +211,7 @@ static int migor_ts_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(migor_ts_pm, migor_ts_suspend, migor_ts_resume);
 
 static const struct i2c_device_id migor_ts_id[] = {
-       { "migor_ts" },
+       { .name = "migor_ts" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, migor_ts_id);
index af46208..9597214 100644 (file)
@@ -667,7 +667,7 @@ static int mms114_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(mms114_pm_ops, mms114_suspend, mms114_resume);
 
 static const struct i2c_device_id mms114_id[] = {
-       { "mms114" },
+       { .name = "mms114" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, mms114_id);
index 708bfb9..0f771f6 100644 (file)
@@ -326,8 +326,8 @@ static const struct of_device_id nvt_ts_of_match[] = {
 MODULE_DEVICE_TABLE(of, nvt_ts_of_match);
 
 static const struct i2c_device_id nvt_ts_i2c_id[] = {
-       { "nt11205-ts", (unsigned long) &nvt_nt11205_ts_data },
-       { "nt36672a-ts", (unsigned long) &nvt_nt36672a_ts_data },
+       { .name = "nt11205-ts", .driver_data = (unsigned long)&nvt_nt11205_ts_data },
+       { .name = "nt36672a-ts", .driver_data = (unsigned long)&nvt_nt36672a_ts_data },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, nvt_ts_i2c_id);
index c6b3615..1ca5920 100644 (file)
@@ -580,8 +580,8 @@ static const struct pixcir_i2c_chip_data pixcir_tangoc_data = {
 };
 
 static const struct i2c_device_id pixcir_i2c_ts_id[] = {
-       { "pixcir_ts", (unsigned long) &pixcir_ts_data },
-       { "pixcir_tangoc", (unsigned long) &pixcir_tangoc_data },
+       { .name = "pixcir_ts", .driver_data = (unsigned long)&pixcir_ts_data },
+       { .name = "pixcir_tangoc", .driver_data = (unsigned long)&pixcir_tangoc_data },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, pixcir_i2c_ts_id);
index f2d33ad..0256055 100644 (file)
@@ -1219,8 +1219,8 @@ static DEFINE_SIMPLE_DEV_PM_OPS(raydium_i2c_pm_ops,
                                raydium_i2c_suspend, raydium_i2c_resume);
 
 static const struct i2c_device_id raydium_i2c_id[] = {
-       { "raydium_i2c" },
-       { "rm32380" },
+       { .name = "raydium_i2c" },
+       { .name = "rm32380" },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, raydium_i2c_id);
index 295d8d7..a5c06b7 100644 (file)
@@ -1144,7 +1144,7 @@ static int rohm_bu21023_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id rohm_bu21023_i2c_id[] = {
-       { BU21023_NAME },
+       { .name = BU21023_NAME },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, rohm_bu21023_i2c_id);
index e1518a7..0f24a9b 100644 (file)
@@ -520,7 +520,7 @@ MODULE_DEVICE_TABLE(of, s6sy761_of_match);
 #endif
 
 static const struct i2c_device_id s6sy761_id[] = {
-       { "s6sy761" },
+       { .name = "s6sy761" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, s6sy761_id);
index 5ccc967..44d7141 100644 (file)
@@ -776,12 +776,12 @@ static int silead_ts_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(silead_ts_pm, silead_ts_suspend, silead_ts_resume);
 
 static const struct i2c_device_id silead_ts_id[] = {
-       { "gsl1680" },
-       { "gsl1688" },
-       { "gsl3670" },
-       { "gsl3675" },
-       { "gsl3692" },
-       { "mssl1680" },
+       { .name = "gsl1680" },
+       { .name = "gsl1688" },
+       { .name = "gsl3670" },
+       { .name = "gsl3675" },
+       { .name = "gsl3692" },
+       { .name = "mssl1680" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, silead_ts_id);
index a625f2a..4fa93cd 100644 (file)
@@ -374,8 +374,8 @@ MODULE_DEVICE_TABLE(of, sis_ts_dt_ids);
 #endif
 
 static const struct i2c_device_id sis_ts_id[] = {
-       { SIS_I2C_NAME },
-       { "9200-ts" },
+       { .name = SIS_I2C_NAME },
+       { .name = "9200-ts" },
        { /* sentinel */  }
 };
 MODULE_DEVICE_TABLE(i2c, sis_ts_id);
index 9b26692..c2dcfce 100644 (file)
@@ -453,8 +453,8 @@ static DEFINE_SIMPLE_DEV_PM_OPS(st1232_ts_pm_ops,
                                st1232_ts_suspend, st1232_ts_resume);
 
 static const struct i2c_device_id st1232_ts_id[] = {
-       { ST1232_TS_NAME, (unsigned long)&st1232_chip_info },
-       { ST1633_TS_NAME, (unsigned long)&st1633_chip_info },
+       { .name = ST1232_TS_NAME, .driver_data = (unsigned long)&st1232_chip_info },
+       { .name = ST1633_TS_NAME, .driver_data = (unsigned long)&st1633_chip_info },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, st1232_ts_id);
index 454f7e8..9726877 100644 (file)
@@ -837,7 +837,7 @@ MODULE_DEVICE_TABLE(of, stmfts_of_match);
 #endif
 
 static const struct i2c_device_id stmfts_id[] = {
-       { "stmfts" },
+       { .name = "stmfts" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, stmfts_id);
index 787f2ca..130aeb7 100644 (file)
@@ -43,7 +43,7 @@ static int tsc2004_probe(struct i2c_client *i2c)
 }
 
 static const struct i2c_device_id tsc2004_idtable[] = {
-       { "tsc2004" },
+       { .name = "tsc2004" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, tsc2004_idtable);
index f9b3d25..4a775c5 100644 (file)
@@ -405,7 +405,7 @@ static int tsc2007_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tsc2007_idtable[] = {
-       { "tsc2007" },
+       { .name = "tsc2007" },
        { }
 };
 
index fd97a83..dd7c2a8 100644 (file)
@@ -253,7 +253,7 @@ static int wacom_i2c_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(wacom_i2c_pm, wacom_i2c_suspend, wacom_i2c_resume);
 
 static const struct i2c_device_id wacom_i2c_id[] = {
-       { "WAC_I2C_EMR" },
+       { .name = "WAC_I2C_EMR" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, wacom_i2c_id);
index bdaabb1..1af3092 100644 (file)
@@ -1140,7 +1140,7 @@ static int wdt87xx_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(wdt87xx_pm_ops, wdt87xx_suspend, wdt87xx_resume);
 
 static const struct i2c_device_id wdt87xx_dev_id[] = {
-       { WDT87XX_NAME },
+       { .name = WDT87XX_NAME },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, wdt87xx_dev_id);
index 943634b..a341142 100644 (file)
@@ -236,7 +236,7 @@ static const struct of_device_id zet6223_of_match[] = {
 MODULE_DEVICE_TABLE(of, zet6223_of_match);
 
 static const struct i2c_device_id zet6223_id[] = {
-       { "zet6223" },
+       { .name = "zet6223" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, zet6223_id);
index a360749..4bfc956 100644 (file)
@@ -831,7 +831,7 @@ static int zforce_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id zforce_idtable[] = {
-       { "zforce-ts" },
+       { .name = "zforce-ts" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, zforce_idtable);