drm: Drop explicit initialization of struct i2c_device_id::driver_data to 0
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Wed, 4 Dec 2024 10:58:27 +0000 (11:58 +0100)
committerDouglas Anderson <dianders@chromium.org>
Fri, 13 Dec 2024 17:27:46 +0000 (09:27 -0800)
These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

While add it, also remove commas after the sentinel entries.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Liu Ying <victor.liu@nxp.com> # ite-it6263.c
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20241204105827.1682632-2-u.kleine-koenig@baylibre.com
22 files changed:
drivers/gpu/drm/bridge/analogix/analogix-anx6345.c
drivers/gpu/drm/bridge/analogix/anx7625.c
drivers/gpu/drm/bridge/chrontel-ch7033.c
drivers/gpu/drm/bridge/ite-it6263.c
drivers/gpu/drm/bridge/ite-it6505.c
drivers/gpu/drm/bridge/lontium-lt8912b.c
drivers/gpu/drm/bridge/lontium-lt9611.c
drivers/gpu/drm/bridge/lontium-lt9611uxc.c
drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
drivers/gpu/drm/bridge/nxp-ptn3460.c
drivers/gpu/drm/bridge/sii902x.c
drivers/gpu/drm/bridge/sii9234.c
drivers/gpu/drm/bridge/sil-sii8620.c
drivers/gpu/drm/bridge/tc358767.c
drivers/gpu/drm/bridge/tc358768.c
drivers/gpu/drm/bridge/ti-dlpc3433.c
drivers/gpu/drm/bridge/ti-sn65dsi86.c
drivers/gpu/drm/bridge/ti-tfp410.c
drivers/gpu/drm/i2c/ch7006_drv.c
drivers/gpu/drm/i2c/sil164_drv.c
drivers/gpu/drm/i2c/tda9950.c
drivers/gpu/drm/i2c/tda998x_drv.c

index b754947e3e001bd388087dd14ecab706eec114f9..83d711ee3a2eb8b7a491c115171b5cc12a9df066 100644 (file)
@@ -793,7 +793,7 @@ static void anx6345_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id anx6345_id[] = {
-       { "anx6345", 0 },
+       { "anx6345" },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, anx6345_id);
index a2675b121fe44b96945f34215fd900f35bfde43a..3427322f986a6d3dfb5a3bc94000aeedac61e4cf 100644 (file)
@@ -2795,7 +2795,7 @@ static void anx7625_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id anx7625_id[] = {
-       {"anx7625", 0},
+       { "anx7625" },
        {}
 };
 
index c83486cf6b15f105f28c27cc4fca4d24817ea335..da17f0978a791fe9bffab3fa0527e3a355d65c6b 100644 (file)
@@ -597,7 +597,7 @@ static const struct of_device_id ch7033_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, ch7033_dt_ids);
 
 static const struct i2c_device_id ch7033_ids[] = {
-       { "ch7033", 0 },
+       { "ch7033" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ch7033_ids);
index 3fc5c67954870ceeacda09c0dd2b99a43dacd3d6..44af1f25034a6e3e7eca1d679c24bde38cb2e6cb 100644 (file)
@@ -897,7 +897,7 @@ static const struct of_device_id it6263_of_match[] = {
 MODULE_DEVICE_TABLE(of, it6263_of_match);
 
 static const struct i2c_device_id it6263_i2c_ids[] = {
-       { "it6263", 0 },
+       { "it6263" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, it6263_i2c_ids);
index 008d86cc562af77952d65beacc3979b8611ea6cc..0faad10ba8e448e1611a487f361d4471357f773a 100644 (file)
@@ -3497,7 +3497,7 @@ static void it6505_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id it6505_id[] = {
-       { "it6505", 0 },
+       { "it6505" },
        { }
 };
 
index e265ab3c8c92937873ef4c4a81d0792ee2af2ffd..52da204f57404e63c7eadb4318b55082ae732105 100644 (file)
@@ -815,8 +815,8 @@ static const struct of_device_id lt8912_dt_match[] = {
 MODULE_DEVICE_TABLE(of, lt8912_dt_match);
 
 static const struct i2c_device_id lt8912_id[] = {
-       {"lt8912", 0},
-       {},
+       { "lt8912" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, lt8912_id);
 
index 1ffbe473e4103dfc315a8cd3571e9407bf518797..74f726efc74613460a6eb9c41f0bbad2ab06208f 100644 (file)
@@ -1234,7 +1234,7 @@ static void lt9611_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lt9611_id[] = {
-       { "lontium,lt9611", 0 },
+       { "lontium,lt9611" },
        {}
 };
 MODULE_DEVICE_TABLE(i2c, lt9611_id);
index f89af8203c9d67cb05b629b27f66cf996baedd16..db9a5466060b663e88d58e85f24bf2d58d74a81c 100644 (file)
@@ -914,7 +914,7 @@ static void lt9611uxc_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lt9611uxc_id[] = {
-       { "lontium,lt9611uxc", 0 },
+       { "lontium,lt9611uxc" },
        { /* sentinel */ }
 };
 
index 37f1acf5c0f83ded2fb3d83150dc05cb6cfd2432..a3dcee62e7a59e7895d39eb77575da21203cb136 100644 (file)
@@ -318,8 +318,8 @@ static void stdp4028_ge_b850v3_fw_remove(struct i2c_client *stdp4028_i2c)
 }
 
 static const struct i2c_device_id stdp4028_ge_b850v3_fw_i2c_table[] = {
-       {"stdp4028_ge_fw", 0},
-       {},
+       { "stdp4028_ge_fw" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, stdp4028_ge_b850v3_fw_i2c_table);
 
@@ -365,8 +365,8 @@ static void stdp2690_ge_b850v3_fw_remove(struct i2c_client *stdp2690_i2c)
 }
 
 static const struct i2c_device_id stdp2690_ge_b850v3_fw_i2c_table[] = {
-       {"stdp2690_ge_fw", 0},
-       {},
+       { "stdp2690_ge_fw" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, stdp2690_ge_b850v3_fw_i2c_table);
 
index e77aab965fcf91f3e8449ff1302f6594d412f5d6..44e36ae66db487c871712432eecfcb0d68a28da4 100644 (file)
@@ -319,8 +319,8 @@ static void ptn3460_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ptn3460_i2c_table[] = {
-       {"ptn3460", 0},
-       {},
+       { "ptn3460" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, ptn3460_i2c_table);
 
index 9be9cc5b902594ebe6e1ac29ab8684623e336796..127da22011b3235b049c38413e56d50414cf36fb 100644 (file)
@@ -1239,8 +1239,8 @@ static const struct of_device_id sii902x_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, sii902x_dt_ids);
 
 static const struct i2c_device_id sii902x_i2c_ids[] = {
-       { "sii9022", 0 },
-       { },
+       { "sii9022" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, sii902x_i2c_ids);
 
index 0c74cdc070326d03361df30b19209c1a8c4e0b7e..cd7837c9a6e00b572a3fb65e5e0c9fa884555a73 100644 (file)
@@ -945,8 +945,8 @@ static const struct of_device_id sii9234_dt_match[] = {
 MODULE_DEVICE_TABLE(of, sii9234_dt_match);
 
 static const struct i2c_device_id sii9234_id[] = {
-       { "SII9234", 0 },
-       { },
+       { "SII9234" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, sii9234_id);
 
index 26b8d137bce096c7c848785da414e26dfa8d4945..28a2e1ee04b2828364c6e633399b821562fc8728 100644 (file)
@@ -2368,8 +2368,8 @@ static const struct of_device_id sii8620_dt_match[] = {
 MODULE_DEVICE_TABLE(of, sii8620_dt_match);
 
 static const struct i2c_device_id sii8620_id[] = {
-       { "sii8620", 0 },
-       { },
+       { "sii8620" },
+       { }
 };
 
 MODULE_DEVICE_TABLE(i2c, sii8620_id);
index 7275e66faefc5fb53ceb8f6fb5ab8f4cbec714e1..4637bf6ea7a360c0000ab6f88cefaa50060687e2 100644 (file)
@@ -2587,7 +2587,7 @@ static void tc_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tc358767_i2c_ids[] = {
-       { "tc358767", 0 },
+       { "tc358767" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, tc358767_i2c_ids);
index 2cb748bbefcd15bb9500a409f12b291917e10082..ec79b0dd0e2cd6dfbdd8aee54d6a8d9cf8bfb060 100644 (file)
@@ -1244,8 +1244,8 @@ static const struct regmap_config tc358768_regmap_config = {
 };
 
 static const struct i2c_device_id tc358768_i2c_ids[] = {
-       { "tc358768", 0 },
-       { "tc358778", 0 },
+       { "tc358768" },
+       { "tc358778" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, tc358768_i2c_ids);
index a0a1b5dd794ef815d6d9f70932e285e0c669b601..eaec70fa42b6213df75b9a9ee581a61c116acb3c 100644 (file)
@@ -389,7 +389,7 @@ static void dlpc3433_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id dlpc3433_id[] = {
-       { "ti,dlpc3433", 0 },
+       { "ti,dlpc3433" },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, dlpc3433_id);
index ce4c026b064f7227d880d19a431981f4bb037296..e4d9006b59f1b975cf63e26b221e985206caf867 100644 (file)
@@ -1971,8 +1971,8 @@ static int ti_sn65dsi86_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ti_sn65dsi86_id[] = {
-       { "ti,sn65dsi86", 0},
-       {},
+       { "ti,sn65dsi86" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, ti_sn65dsi86_id);
 
index 107a2c0b96c99edc040ef667914c68e5b9264eba..79ab5da827e1fd3850435a02daedad87186a4ab8 100644 (file)
@@ -435,7 +435,7 @@ static void tfp410_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id tfp410_i2c_ids[] = {
-       { "tfp410", 0 },
+       { "tfp410" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, tfp410_i2c_ids);
index 131512a5f3bd996ad1e2eb869ffa09837daba0c7..fcb0fcd6c89718bc8613ab63482ccc005ace079b 100644 (file)
@@ -486,7 +486,7 @@ static int ch7006_encoder_init(struct i2c_client *client,
 }
 
 static const struct i2c_device_id ch7006_ids[] = {
-       { "ch7006", 0 },
+       { "ch7006" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ch7006_ids);
index ff23422727fce290a188e495d343e32bc2c373ec..c17afa025d9d917892055f8e8765d5f9e6259003 100644 (file)
@@ -413,7 +413,7 @@ sil164_encoder_init(struct i2c_client *client,
 }
 
 static const struct i2c_device_id sil164_ids[] = {
-       { "sil164", 0 },
+       { "sil164" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, sil164_ids);
index 82d618c40dceacba2e98210e5b538ae6b9306b11..cbff851e0c85f8dd5c10a086b81d8a0e95a8b5a8 100644 (file)
@@ -486,8 +486,8 @@ static void tda9950_remove(struct i2c_client *client)
 }
 
 static struct i2c_device_id tda9950_ids[] = {
-       { "tda9950", 0 },
-       { },
+       { "tda9950" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, tda9950_ids);
 
index 2160f05bbd16d2346e27365e5549b75ad26fdcb9..57ce77c2be2458fff5b752332ae51e016582ddca 100644 (file)
@@ -2094,7 +2094,7 @@ MODULE_DEVICE_TABLE(of, tda998x_dt_ids);
 #endif
 
 static const struct i2c_device_id tda998x_ids[] = {
-       { "tda998x", 0 },
+       { "tda998x" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, tda998x_ids);