]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpio: Initialize all i2c_device_id arrays using member names
authorUwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Wed, 20 May 2026 07:48:12 +0000 (09:48 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Wed, 20 May 2026 13:24:49 +0000 (15:24 +0200)
The previously applied similar commit 553e26a45e0e ("gpio: Initialize
i2c_device_id arrays using member names") only handled i2c_device_id
arrays that also have an assignment for .driver_data.

For consistency also convert the entries without such an assignment.
Again this is a modification that has no influence on the generated
code, it's only more robust against changes to struct i2c_device_id and
easier to understand for a human.

While touching adnp_i2c_id[] drop the comma after the list terminator.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20260520074812.1632512-2-u.kleine-koenig@baylibre.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
drivers/gpio/gpio-adnp.c
drivers/gpio/gpio-ds4520.c
drivers/gpio/gpio-fxl6408.c
drivers/gpio/gpio-gw-pld.c
drivers/gpio/gpio-max7300.c
drivers/gpio/gpio-tpic2810.c
drivers/gpio/gpio-ts4900.c

index e5ac2d2110137f6c48ff6eeb3ee0097f0241cd48..27a80d1143a1901a3a13d58458aebf5fa9b0f142 100644 (file)
@@ -499,8 +499,8 @@ static int adnp_i2c_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id adnp_i2c_id[] = {
-       { "gpio-adnp" },
-       { },
+       { .name = "gpio-adnp" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, adnp_i2c_id);
 
index f52ecae382a4539b791e7835f294b62a112e5815..5add662a7ef5127d697794648e4d721c08ec44a0 100644 (file)
@@ -54,7 +54,7 @@ static const struct of_device_id ds4520_gpio_of_match_table[] = {
 MODULE_DEVICE_TABLE(of, ds4520_gpio_of_match_table);
 
 static const struct i2c_device_id ds4520_gpio_id_table[] = {
-       { "ds4520-gpio" },
+       { .name = "ds4520-gpio" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ds4520_gpio_id_table);
index afc1b8461dabbbfcc96b9f59c3d12d84e642e6f5..45b02d36e66ff38b0e42ee6d286533919567e3fc 100644 (file)
@@ -150,7 +150,7 @@ static const __maybe_unused struct of_device_id fxl6408_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, fxl6408_dt_ids);
 
 static const struct i2c_device_id fxl6408_id[] = {
-       { "fxl6408" },
+       { .name = "fxl6408" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, fxl6408_id);
index 2e5d97b7363fdd998a8d09c3e059e83ebcf52bbf..bf1f91c3c4a8b98d4971ba16807e2e0dd28e766c 100644 (file)
@@ -109,7 +109,7 @@ static int gw_pld_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id gw_pld_id[] = {
-       { "gw-pld", },
+       { .name = "gw-pld" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, gw_pld_id);
index 621d609ece904aab4a029787e11c6fed006f8b6b..62f2434c0d79b66feb72d5b4094e989da3f7f523 100644 (file)
@@ -53,7 +53,7 @@ static void max7300_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id max7300_id[] = {
-       { "max7300" },
+       { .name = "max7300" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, max7300_id);
index 866ff2d436d53f5717e118f03dafda1575f98298..c38538653e9916c420d3752191def69c449ee6d8 100644 (file)
@@ -112,7 +112,7 @@ static int tpic2810_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tpic2810_id_table[] = {
-       { "tpic2810", },
+       { .name = "tpic2810" },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, tpic2810_id_table);
index d9ee8fc77ccdf94f85d37eec7310fa2ce6f484a2..b46b48e56c565de7868cdd0a1e2727d8b4ff7146 100644 (file)
@@ -175,7 +175,7 @@ static int ts4900_gpio_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ts4900_gpio_id_table[] = {
-       { "ts4900-gpio", },
+       { .name = "ts4900-gpio" },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, ts4900_gpio_id_table);