]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
leds: Use named initializers for arrays of i2c_device_data
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Fri, 22 May 2026 10:42:22 +0000 (12:42 +0200)
committerLee Jones <lee@kernel.org>
Wed, 17 Jun 2026 10:29:48 +0000 (11:29 +0100)
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 and commas.

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>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Link: https://patch.msgid.link/20260522104222.4081017-2-u.kleine-koenig@baylibre.com
Signed-off-by: Lee Jones <lee@kernel.org>
34 files changed:
drivers/leds/flash/leds-as3645a.c
drivers/leds/flash/leds-lm3601x.c
drivers/leds/leds-an30259a.c
drivers/leds/leds-as3668.c
drivers/leds/leds-aw200xx.c
drivers/leds/leds-bd2802.c
drivers/leds/leds-blinkm.c
drivers/leds/leds-is31fl319x.c
drivers/leds/leds-is31fl32xx.c
drivers/leds/leds-lm3530.c
drivers/leds/leds-lm3532.c
drivers/leds/leds-lm355x.c
drivers/leds/leds-lm3642.c
drivers/leds/leds-lm3692x.c
drivers/leds/leds-lm3697.c
drivers/leds/leds-lp3944.c
drivers/leds/leds-lp3952.c
drivers/leds/leds-lp50xx.c
drivers/leds/leds-lp5521.c
drivers/leds/leds-lp5523.c
drivers/leds/leds-lp5562.c
drivers/leds/leds-lp5569.c
drivers/leds/leds-lp8501.c
drivers/leds/leds-lp8860.c
drivers/leds/leds-lp8864.c
drivers/leds/leds-pca9532.c
drivers/leds/leds-pca955x.c
drivers/leds/leds-pca963x.c
drivers/leds/leds-pca995x.c
drivers/leds/leds-st1202.c
drivers/leds/leds-tca6507.c
drivers/leds/leds-tlc591xx.c
drivers/leds/leds-turris-omnia.c
drivers/leds/rgb/leds-ktd202x.c

index 2f2d783c62c31889ef0aac1fb19beeb65a900c12..5fefcaef37145f8d58dae2490159e02e99e91039 100644 (file)
@@ -741,7 +741,7 @@ static void as3645a_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id as3645a_id_table[] = {
-       { AS_NAME },
+       { .name = AS_NAME },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, as3645a_id_table);
index abf6b96ade3d58579134fba33c8f7d5249fe7739..8d00510c8967b604dd7453aee2b96cb6b7572f5f 100644 (file)
@@ -465,8 +465,8 @@ static void lm3601x_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lm3601x_id[] = {
-       { "LM36010", CHIP_LM36010 },
-       { "LM36011", CHIP_LM36011 },
+       { .name = "LM36010", .driver_data = CHIP_LM36010 },
+       { .name = "LM36011", .driver_data = CHIP_LM36011 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lm3601x_id);
index a42cc4bc6917108460b189b275095e242b5fdb14..4654a732d1b166f627617a43400421cf4a4e15b9 100644 (file)
@@ -331,7 +331,7 @@ static const struct of_device_id an30259a_match_table[] = {
 MODULE_DEVICE_TABLE(of, an30259a_match_table);
 
 static const struct i2c_device_id an30259a_id[] = {
-       { "an30259a" },
+       { .name = "an30259a" },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, an30259a_id);
index b2794492370e7026a574cb12de88fa615821353f..46427fe752a83d124f6fa55d853d1e2b553faec0 100644 (file)
@@ -175,7 +175,7 @@ static void as3668_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id as3668_idtable[] = {
-       { "as3668" },
+       { .name = "as3668" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, as3668_idtable);
index fe223d363a5d4fe46aa3fa68e23828beb5527417..0d90eeb6448f30d42daa7d21211026e49653d96c 100644 (file)
@@ -637,11 +637,11 @@ static const struct aw200xx_chipdef aw20108_cdef = {
 };
 
 static const struct i2c_device_id aw200xx_id[] = {
-       { "aw20036" },
-       { "aw20054" },
-       { "aw20072" },
-       { "aw20108" },
-       {}
+       { .name = "aw20036" },
+       { .name = "aw20054" },
+       { .name = "aw20072" },
+       { .name = "aw20108" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, aw200xx_id);
 
index 2a08c5f2760898696188782870aaaee3238c4bd2..9732f41a114312ee055933698641724f0f3c74a2 100644 (file)
@@ -776,7 +776,7 @@ static int bd2802_resume(struct device *dev)
 static SIMPLE_DEV_PM_OPS(bd2802_pm, bd2802_suspend, bd2802_resume);
 
 static const struct i2c_device_id bd2802_id[] = {
-       { "BD2802" },
+       { .name = "BD2802" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, bd2802_id);
index 1978bbda47dbcd2af2ef4543590a9d3ee5bed714..ee1589015826b97842b142cdba2da793a6b9c5b0 100644 (file)
@@ -806,8 +806,8 @@ static void blinkm_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id blinkm_id[] = {
-       { "blinkm" },
-       {}
+       { .name = "blinkm" },
+       { }
 };
 
 MODULE_DEVICE_TABLE(i2c, blinkm_id);
index e411cee06dabdef7d52e73974471448fe607cecf..80f38dba0fba48b87429ada594e3126a68a6eef7 100644 (file)
@@ -565,17 +565,17 @@ static int is31fl319x_probe(struct i2c_client *client)
  * even though it is not used for DeviceTree based instantiation.
  */
 static const struct i2c_device_id is31fl319x_id[] = {
-       { "is31fl3190" },
-       { "is31fl3191" },
-       { "is31fl3193" },
-       { "is31fl3196" },
-       { "is31fl3199" },
-       { "sn3190" },
-       { "sn3191" },
-       { "sn3193" },
-       { "sn3196" },
-       { "sn3199" },
-       {},
+       { .name = "is31fl3190" },
+       { .name = "is31fl3191" },
+       { .name = "is31fl3193" },
+       { .name = "is31fl3196" },
+       { .name = "is31fl3199" },
+       { .name = "sn3190" },
+       { .name = "sn3191" },
+       { .name = "sn3193" },
+       { .name = "sn3196" },
+       { .name = "sn3199" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, is31fl319x_id);
 
index fe07acbb103a8d074a0baa9516f344a171f5797f..6c8d6b83326004fa0950c7c957cb4b0847f5f27e 100644 (file)
@@ -616,15 +616,15 @@ static void is31fl32xx_remove(struct i2c_client *client)
  * even though it is not used for DeviceTree based instantiation.
  */
 static const struct i2c_device_id is31fl32xx_id[] = {
-       { "is31fl3293" },
-       { "is31fl3236" },
-       { "is31fl3236a" },
-       { "is31fl3235" },
-       { "is31fl3218" },
-       { "sn3218" },
-       { "is31fl3216" },
-       { "sn3216" },
-       {},
+       { .name = "is31fl3293" },
+       { .name = "is31fl3236" },
+       { .name = "is31fl3236a" },
+       { .name = "is31fl3235" },
+       { .name = "is31fl3218" },
+       { .name = "sn3218" },
+       { .name = "is31fl3216" },
+       { .name = "sn3216" },
+       { }
 };
 
 MODULE_DEVICE_TABLE(i2c, is31fl32xx_id);
index e44a3db106c3ca037a37354d0f4d771b614d3f4f..481e9c0a41e7b6d53b63f802c74ca24838bc1ff5 100644 (file)
@@ -478,8 +478,8 @@ static void lm3530_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lm3530_id[] = {
-       { LM3530_NAME },
-       {}
+       { .name = LM3530_NAME },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, lm3530_id);
 
index 24dc8ad27bb3c01525c450fdeffeca6de80b972e..b51496910b082606efe33403384b703cebea9535 100644 (file)
@@ -722,8 +722,8 @@ static const struct of_device_id of_lm3532_leds_match[] = {
 MODULE_DEVICE_TABLE(of, of_lm3532_leds_match);
 
 static const struct i2c_device_id lm3532_id[] = {
-       { LM3532_NAME },
-       {}
+       { .name = LM3532_NAME },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, lm3532_id);
 
index f68771b9eac6bb30eaa2db471e11c5daa599ded2..2b7cf42141e4f484686d1e3226966285c907797c 100644 (file)
@@ -504,9 +504,9 @@ static void lm355x_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lm355x_id[] = {
-       {LM3554_NAME, CHIP_LM3554},
-       {LM3556_NAME, CHIP_LM3556},
-       {}
+       { .name = LM3554_NAME, .driver_data = CHIP_LM3554 },
+       { .name = LM3556_NAME, .driver_data = CHIP_LM3556 },
+       { }
 };
 
 MODULE_DEVICE_TABLE(i2c, lm355x_id);
index 36246267b096c9def8225469084830bd1c5b4ac0..2a893399e05f21bdab4b7ba99e6a0d4ed574f167 100644 (file)
@@ -388,8 +388,8 @@ static void lm3642_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lm3642_id[] = {
-       { LM3642_NAME },
-       {}
+       { .name = LM3642_NAME },
+       { }
 };
 
 MODULE_DEVICE_TABLE(i2c, lm3642_id);
index 1d64ceb5ac859a5e80f4c8d1298a306af44b043f..95b850a3b31c2184ead608818c8073e81069f6a2 100644 (file)
@@ -503,8 +503,8 @@ static void lm3692x_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lm3692x_id[] = {
-       { "lm36922", LM36922_MODEL },
-       { "lm36923", LM36923_MODEL },
+       { .name = "lm36922", .driver_data = LM36922_MODEL },
+       { .name = "lm36923", .driver_data = LM36923_MODEL },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lm3692x_id);
index 7ad232780a31006ac1a96e813e7d00fbe1727f84..933191fb2be01fe8e36cf9e14dd6ce7f3c32ecb5 100644 (file)
@@ -354,7 +354,7 @@ static void lm3697_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lm3697_id[] = {
-       { "lm3697" },
+       { .name = "lm3697" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lm3697_id);
index ccfeee49ea78c44a5500a79c7fb540d6ee55f663..8e95dcedce40088b9fa5ba35be7a664584f2e7d9 100644 (file)
@@ -417,8 +417,8 @@ static void lp3944_remove(struct i2c_client *client)
 
 /* lp3944 i2c driver struct */
 static const struct i2c_device_id lp3944_id[] = {
-       { "lp3944" },
-       {}
+       { .name = "lp3944" },
+       { }
 };
 
 MODULE_DEVICE_TABLE(i2c, lp3944_id);
index 17219a5827045fa9b1e519afe77faea0648be905..0a1af284f52bf4f5aa3f5bc9f1320c7d3573bada 100644 (file)
@@ -266,8 +266,8 @@ static int lp3952_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lp3952_id[] = {
-       { LP3952_NAME },
-       {}
+       { .name = LP3952_NAME },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, lp3952_id);
 
index 69c3550f1a31ca8efb9e77b512feb07b4b291b15..259169214aaf29eb96ae9eb0fed86153f1cbd215 100644 (file)
@@ -601,12 +601,12 @@ static void lp50xx_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lp50xx_id[] = {
-       { "lp5009", (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5009] },
-       { "lp5012", (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5012] },
-       { "lp5018", (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5018] },
-       { "lp5024", (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5024] },
-       { "lp5030", (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5030] },
-       { "lp5036", (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5036] },
+       { .name = "lp5009", .driver_data = (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5009] },
+       { .name = "lp5012", .driver_data = (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5012] },
+       { .name = "lp5018", .driver_data = (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5018] },
+       { .name = "lp5024", .driver_data = (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5024] },
+       { .name = "lp5030", .driver_data = (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5030] },
+       { .name = "lp5036", .driver_data = (kernel_ulong_t)&lp50xx_chip_info_tbl[LP5036] },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lp50xx_id);
index 7564b99534089bd3f7b54b2ebe8e617d8341add6..4937fc968011fd9c6f58fcfde7e65f9d2fb6b725 100644 (file)
@@ -253,7 +253,7 @@ static struct lp55xx_device_config lp5521_cfg = {
 };
 
 static const struct i2c_device_id lp5521_id[] = {
-       { "lp5521", .driver_data = (kernel_ulong_t)&lp5521_cfg, }, /* Three channel chip */
+       { .name = "lp5521", .driver_data = (kernel_ulong_t)&lp5521_cfg }, /* Three channel chip */
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lp5521_id);
index 4ed3e735260cfab8be0e55adcd4ef1278b987716..39cb26d343c1353bc96cbed8e69c20b1e9340953 100644 (file)
@@ -346,8 +346,8 @@ static struct lp55xx_device_config lp5523_cfg = {
 };
 
 static const struct i2c_device_id lp5523_id[] = {
-       { "lp5523",  .driver_data = (kernel_ulong_t)&lp5523_cfg, },
-       { "lp55231", .driver_data = (kernel_ulong_t)&lp5523_cfg, },
+       { .name = "lp5523",  .driver_data = (kernel_ulong_t)&lp5523_cfg },
+       { .name = "lp55231", .driver_data = (kernel_ulong_t)&lp5523_cfg },
        { }
 };
 
index 14a4af361b267697d30976e61ad6cfe59dd8dd4b..9e6056821eb5d05ba80f0cc9ee3fcd40ec05ce60 100644 (file)
@@ -395,7 +395,7 @@ static struct lp55xx_device_config lp5562_cfg = {
 };
 
 static const struct i2c_device_id lp5562_id[] = {
-       { "lp5562", .driver_data = (kernel_ulong_t)&lp5562_cfg, },
+       { .name = "lp5562", .driver_data = (kernel_ulong_t)&lp5562_cfg },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lp5562_id);
index a252ba6c455d577d9ef3e29db1ca2469d17efb85..199db3efca656389e59918f81ab7705ea8444b53 100644 (file)
@@ -514,7 +514,7 @@ static struct lp55xx_device_config lp5569_cfg = {
 };
 
 static const struct i2c_device_id lp5569_id[] = {
-       { "lp5569",  .driver_data = (kernel_ulong_t)&lp5569_cfg, },
+       { .name = "lp5569", .driver_data = (kernel_ulong_t)&lp5569_cfg },
        { }
 };
 
index ee4ff4586bc02b55e0b403c419b3548634679844..8009689db7b4897886f4b4958840e17f06cba6e3 100644 (file)
@@ -130,7 +130,7 @@ static struct lp55xx_device_config lp8501_cfg = {
 };
 
 static const struct i2c_device_id lp8501_id[] = {
-       { "lp8501",  .driver_data = (kernel_ulong_t)&lp8501_cfg, },
+       { .name = "lp8501", .driver_data = (kernel_ulong_t)&lp8501_cfg },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lp8501_id);
index 7a436861c4b71c460da602ce490f8647fce3abad..69f064781f699fb17c25346b1c6da0273e5372e1 100644 (file)
@@ -333,7 +333,7 @@ static int lp8860_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lp8860_id[] = {
-       { "lp8860" },
+       { .name = "lp8860" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lp8860_id);
index 3afd729d2f8a67064fdb2685d9cf4d6ec353d236..204727f2f350ec6d0c7dc8fa021cab76af93029c 100644 (file)
@@ -270,8 +270,8 @@ static int lp8864_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lp8864_id[] = {
-       { "lp8864" },
-       {}
+       { .name = "lp8864" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, lp8864_id);
 
index dae7c67605084b4a77489930932cf2f7e9fb7600..f3bf59495b68d19805bba0975fd0b6d4cfdb9bfe 100644 (file)
@@ -67,10 +67,10 @@ enum {
 };
 
 static const struct i2c_device_id pca9532_id[] = {
-       { "pca9530", pca9530 },
-       { "pca9531", pca9531 },
-       { "pca9532", pca9532 },
-       { "pca9533", pca9533 },
+       { .name = "pca9530", .driver_data = pca9530 },
+       { .name = "pca9531", .driver_data = pca9531 },
+       { .name = "pca9532", .driver_data = pca9532 },
+       { .name = "pca9533", .driver_data = pca9533 },
        { }
 };
 
index 2007fe6217ec65d94624ee221b8235dfe74d8464..273383351ba06337277af6538e79c5ff1c78635c 100644 (file)
@@ -764,12 +764,12 @@ static int pca955x_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id pca955x_id[] = {
-       { "pca9550", (kernel_ulong_t)&pca955x_chipdefs[pca9550] },
-       { "pca9551", (kernel_ulong_t)&pca955x_chipdefs[pca9551] },
-       { "pca9552", (kernel_ulong_t)&pca955x_chipdefs[pca9552] },
-       { "ibm-pca9552", (kernel_ulong_t)&pca955x_chipdefs[ibm_pca9552] },
-       { "pca9553", (kernel_ulong_t)&pca955x_chipdefs[pca9553] },
-       {}
+       { .name = "pca9550", .driver_data = (kernel_ulong_t)&pca955x_chipdefs[pca9550] },
+       { .name = "pca9551", .driver_data = (kernel_ulong_t)&pca955x_chipdefs[pca9551] },
+       { .name = "pca9552", .driver_data = (kernel_ulong_t)&pca955x_chipdefs[pca9552] },
+       { .name = "ibm-pca9552", .driver_data = (kernel_ulong_t)&pca955x_chipdefs[ibm_pca9552] },
+       { .name = "pca9553", .driver_data = (kernel_ulong_t)&pca955x_chipdefs[pca9553] },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, pca955x_id);
 
index 050e93b048842112033976c59272369db6470257..e3a81c60ee27c96e5050a829523dfd43e1f0663f 100644 (file)
@@ -88,10 +88,10 @@ static struct pca963x_chipdef pca963x_chipdefs[] = {
 #define PCA963X_BLINK_PERIOD_MAX       10667
 
 static const struct i2c_device_id pca963x_id[] = {
-       { "pca9632", pca9633 },
-       { "pca9633", pca9633 },
-       { "pca9634", pca9634 },
-       { "pca9635", pca9635 },
+       { .name = "pca9632", .driver_data = pca9633 },
+       { .name = "pca9633", .driver_data = pca9633 },
+       { .name = "pca9634", .driver_data = pca9634 },
+       { .name = "pca9635", .driver_data = pca9635 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, pca963x_id);
index 6ad06ce2bf640a3f94cd1a07b0452caba8bedefb..59951207fd04375f1e3bbfa793d023a17b8e1b46 100644 (file)
@@ -188,10 +188,10 @@ static int pca995x_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id pca995x_id[] = {
-       { "pca9952", .driver_data = (kernel_ulong_t)&pca9952_chipdef },
-       { "pca9955b", .driver_data = (kernel_ulong_t)&pca9955b_chipdef },
-       { "pca9956b", .driver_data = (kernel_ulong_t)&pca9956b_chipdef },
-       {}
+       { .name = "pca9952", .driver_data = (kernel_ulong_t)&pca9952_chipdef },
+       { .name = "pca9955b", .driver_data = (kernel_ulong_t)&pca9955b_chipdef },
+       { .name = "pca9956b", .driver_data = (kernel_ulong_t)&pca9956b_chipdef },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, pca995x_id);
 
index 2b68cd3c45f8de98121753b9e7b2a06f7b429309..7f68d956f6948ca67c1c3f2175b945e94a2bcbb6 100644 (file)
@@ -389,7 +389,7 @@ static int st1202_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id st1202_id[] = {
-       { "st1202-i2c" },
+       { .name = "st1202-i2c" },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, st1202_id);
index fd0e8bab9a4bf94329ecf2bebfe381cd574d50b3..9afe2722986cf772e0a118f965351b6f009aa7d1 100644 (file)
@@ -182,7 +182,7 @@ struct tca6507_chip {
 };
 
 static const struct i2c_device_id tca6507_id[] = {
-       { "tca6507" },
+       { .name = "tca6507" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, tca6507_id);
index 6605e08a042a641c84413c00b93256c46d795dd1..2f272cfd2e916fb318f70cff8e1dc36d23673152 100644 (file)
@@ -214,9 +214,9 @@ tlc591xx_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tlc591xx_id[] = {
-       { "tlc59116" },
-       { "tlc59108" },
-       {},
+       { .name = "tlc59116" },
+       { .name = "tlc59108" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, tlc591xx_id);
 
index 25ee5c1eb820b3901a929f70855d6a64abf20377..ed6a47bbb44f9c0c0c8460bd4647ea9786713b4a 100644 (file)
@@ -532,7 +532,7 @@ static const struct of_device_id of_omnia_leds_match[] = {
 MODULE_DEVICE_TABLE(of, of_omnia_leds_match);
 
 static const struct i2c_device_id omnia_id[] = {
-       { "omnia" },
+       { .name = "omnia" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, omnia_id);
index e4f0f25a5e4563825a334269141612056bef9134..143020945e23f8b93adc421aa1f73259d9e18918 100644 (file)
@@ -605,9 +605,9 @@ static void ktd202x_shutdown(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ktd202x_id[] = {
-       {"ktd2026", KTD2026_NUM_LEDS},
-       {"ktd2027", KTD2027_NUM_LEDS},
-       {}
+       { .name = "ktd2026", .driver_data = KTD2026_NUM_LEDS },
+       { .name = "ktd2027", .driver_data = KTD2027_NUM_LEDS },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, ktd202x_id);