]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
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 c248c15b849d08255f4fe30ce9dca7f61d7a40f4..5835ed1e29e19ce0c576f0378015266368d909ef 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 7b4d61626898ae1d5a0d77996704de10b1af404f..5fca92bf9df0ea9741ea6c154da49216aac8b6c5 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 6f989d00d3ec39916c2bcffb1d6a2f7a3657b2d3..c471afc7862bcf5801dfd3c7ca295ab41c8ef9be 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 414fbef4abf99d0d1106eb7599645011128c603a..8d14d0f69d4e92a94bdb03beb3252bbf70894f5c 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 0c17cbaa3d27aa9b23963aa329f57f61e59b2467..2447c1ae216618a043a9bc1d7b27fe587b19fe12 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 335b72efc5aa1b4ea52c89fd4aa85ef01f9623fe..4b2ae07f315c86c9a4976f261f68bd98e2acc189 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 4184dd2eaeebedf02039fb0b4f17f42ebafbea52..bf94367f6b644342c2d52035620e90e1174841ca 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 d9df10484755d3b7ff82a4594fbbb5139b4560a5..8eac63b2d3046314481149a18377087e7e1aa384 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 384baabf99248d21222aa916df83aa24243b96e6..34be5b2e476dc680019b6c5744b95271e779f977 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 c10726b5e4d104778c5daa60a0871597f935d743..f8fb44bc49153f22977a2332b1215e9d7574e598 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 47edc161ec7723290a0ae941adac23ca63564627..a1a102855590b574d8342f1e8b39c24f57d6e2a2 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 b255b997e279c8b19e7df7cafc0420eb1662edbf..e31cb115a9548bc7172c405d29cedff020a704f0 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 53f5255fd19dd59c89866addebed8840967c32b3..e64adaca10ffe14ff9b8d3419986b35f91ea1b97 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 68c0afafee7bf4572fbb2cce33ae62450e43cd29..eb5be644f236d19babd3c9384c579a203139dd53 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 55d699d9037d026c08c8c499e9c5f1af4bc5b215..967bbe553c0608767eb0587f021cf7f134a0b6ae 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 2adb7a058362c2838139e78f307e78695aa6f1ee..c3cb561512edf75231efb20ac791a65a0d070af4 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 5ea0ce42a507455222d3c180d720726a3a232e00..84665c612f3c0c53eaf40ad7bbcdda2e0979d931 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 d43aebd785b7c1e96416c522bb1733d8bee29581..3eb02a64acfb48cba8284314bd9773cd399612e1 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 f9744cf0ca80e82945a7af9077b10f948a7266c6..fc4abea68479f0d0358f0f69e091aa6c3eaed011 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 4cc2a0dcaa751cf1bb1a1b5518c8a24d9ab9a5d5..0ef282932095bc31f71d3d398570e3ec5968a0b1 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 f892c5b1e4bdbf4269d1f56724680aaa6a094100..14be6d4682d01d80f32f3d8909561d21e9d28dba 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 e4a605c6af15080e413111d7fa0a28625d02e997..77fcf868dca2ce2adda70689a4801a6ffa2cd5c7 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 e2089d6ac8500419e33c80458466ba23d99808d7..6c5c4c53753b16facb649e3385fa75b27fd8031c 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 46842cb8ddd78875b7fd19ec6e99604a678e96fd..4f8c1f69aa63540cee485711face75f02d7549ba 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 f952a24ec595be6d1b401dd878aaa50609ee25be..97309984fa7ced0962d666c1c15d2fb98d1ff7cd 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 eb9788ea521556142e23a83d01c20dc909bcda85..6b3495ba5763257faf6987cb9dabbc4237755ada 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 0c661140fb88d9892a0dd54116b269eb1af2f3cf..a2888d1ff58f8b9812fc7b9464c2620f47481c8a 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 14fc6c6cf6998c28cacc6687ab8047782a51a0ee..a831fcc851f796599a9cfe51c72ff5a83c0358a8 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 6e0d956617a1c69b9582aa849645af4dd742dcb2..47000c30e4d8b573900536f9d8472f3e94cf7c4e 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 fee1796da3d08449f1e43d098d5bafef7533af6b..294e775510d57c6323620e57daa063a3d5cb86b7 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 6f3d5c33b80705d2108803cf7848b8d21e540bbc..d4cf982f12632f8dac90a8b380da67e0bc4bc851 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 3c0c5fd4470275f50ac61fa0909c1672a56cf402..e11d0acb9b96d047cec04d724f487359efcc7187 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 f3d0b40721df0a69b914e84c20ca9c209b1173c9..6de68c602558b5803ec3a04f077829f3513f89d4 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 e5b99312c3d9fe22adc02a4ade7708d2f9158381..c1ccdf86b74cb772c69da1d8e24b9c7447d6d09b 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 8a588202447dbcab7a9ded1af28962f620481c09..aa43fc1549df764201961def0e4a9e8b993b8a52 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 a9e86ad7ed5ef939a064243f9fd7f5822eb3adaf..74de06ef189416ffa8d449ffa19db9a382311a81 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 401b2264f585f03a7ffc07fd8ca854cc874d0858..6c6ebebacba9a79d78b7a8502647f67afd0a8d22 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 6baebb7ec089b44aee35a821d8ee557dcb9e0df2..d1bdccc56fc8fe57324638f02d5232a4377ec677 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 68d9cd55ceeb6ddc5b90c8b5f9caf75565583378..339fee1622fbc2ba6356f2b744554d046a298698 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 2d4b6e34320303ce98591f5ce6a2554793b46898..0ac48eff33761e50641464eb942f03141740803f 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 54d6c4869eb02de179138df50b030d2da4b36c88..33ad4f0512a08e893ddd7fc6d4f0157507d88b29 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 47f4271395a69b8350f9be7266b57fe11d442ee3..73c397e44da48d4b01e444a789e54fc4b6a59dc6 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 cb15600549cdd6046ab12257540a93bf6bb19a2e..17524f7e944de301fc5b49d81cadbd3637779a67 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 492e19a28a748fe0a02d1946e6e9bb3d22fdc2ef..b12602bc368efc97b0f2a01028458393fa7a5081 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 eb3cc2befcdf455ed3f90bd3589399528f882625..76cf8085553f0c7a822be6d45e534fb99fc0d0fb 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 835d91dff0a4e521039e90498c7e1c44d5151202..17175adcaebbdf914c1eb2f8956dc6f106072a7c 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 78c0911ba6e263ccd284143fa80b97f079f6e9fb..037bb35238a3784d3f740e7a50a5d180a1c46e6c 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 f8798d11ec030fb5027c9bd9260021d092a88309..2c48ad8ee2e6741808da9802242621a2de42fa4e 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 62041bcca83dd13433f2024f51d7b9514848f51c..58e00c314acef3204e3193c703f1c1f551eed2ac 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 896a145ddb2bc21c2e7c8447d5b6506e993eb1ad..0aa67dfacbad84bda6e6803fd66296bdffdbc853 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 b64d7928e18f85b581c2ed812d1ac031382a1427..47d9cd7412d1b99daa2a45e8f456b051188040c1 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 3bf524a6ee204e46e1081b747e421974cad7f9e8..66ada7ffbc80ba1f27cc23d0f027d26e5da1f58e 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 0706443792ba5ddba5e9483d0fdf6fa24f58692b..3de0fbf8da38614e3357f84aead12806026801fa 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 f39633fc8dc2228138951720d530474408b96bd5..3996e4a61ff7d11deb9ee390c58c8a21090b2b61 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 10fccf4e5bb17e76918843b59064200b5c412eba..fd6c0ac301a25295da3b29e491827cb73ad5fab0 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 993d945dcd23181c12c5b110d7a6efeb66a9c0f2..9d221e3404041d3a72ed20db3d517aed1ab287c5 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 af462086a65cad6a6ad639b0beee61feac6a8906..9597214d9d3c9db47e9b00a799f6495ed6ae235e 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 708bfb933ddd3e84f2c9a84fae8efed3ce9a7e3e..0f771f68195285f6c62304ea55e78e7cff15b598 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 c6b3615c877553fca11cc003f75449841266cb01..1ca5920846dfd7e58b332329dbbb3c13eac31fb1 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 f2d33ad86fd21ed7a37e462cbff06bf2aef112c1..0256055abcef31a7a88eeca4fce7b0e4a9b05cbb 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 295d8d75ba3224abd27a1a6275ac29d6a734f1ea..a5c06b7423c0c76feb5e15d38f6861c858745470 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 e1518a75a51b6a2f69eee245f396ff36f9ab3364..0f24a9b730635f361bfa1d8b7d9b3128642fbee5 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 5ccc96764742f33ede7b99935d8f092cba6741db..44d7141103f44dd39dbbe31037b5107ac1f0129a 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 a625f2ad809d3bb9e7958f197fc79b15ada75bfc..4fa93cd31ee4edddc9bb723e57f21e4fed97c82b 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 9b266927b7fe3df0a74b00facd02a0147dfdb80c..c2dcfce5003d296e20e9f3fe57ffaca1e5fb89e6 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 454f7e822e9cb360ed0f599bc4c9729f5c25264a..972687797f8261d4407f00d05df1a257dda675b0 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 787f2caf4f7342ac60144179253ef5dce0cb5e9b..130aeb735b65fef5c6eda7862da24b27ff6ff0d2 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 f9b3d2598933ce2bb9ebee3f851268a4888dcc32..4a775c5df0ea2c55185febd3776dce9e53b610df 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 fd97a83f56649ee57a7cf5f9c2a83424b39c3447..dd7c2a8a831bfd78d312cdb985fbf028e53e9cab 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 bdaabb14dc8c83cfebab24f5b1293bcd8e977e4c..1af3092520926e22b865f07010c11b0b64301558 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 943634ba9cd972d00af463a2a7281c26ab5ca5ba..a341142f3708e2e4f32a0d0483a995ccc3e89c2b 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 a360749fa076fdf0e4a69980639776a6e506ad34..4bfc9560bd6c1ae5e8043ffffa30719a7cc399b8 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);