]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
leds: Drop explicit initialization of struct i2c_device_id::driver_data to 0
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 22 May 2024 16:53:59 +0000 (18:53 +0200)
committerLee Jones <lee@kernel.org>
Fri, 21 Jun 2024 10:57:11 +0000 (11:57 +0100)
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.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20240522165358.62238-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Lee Jones <lee@kernel.org>
15 files changed:
drivers/leds/flash/leds-as3645a.c
drivers/leds/leds-an30259a.c
drivers/leds/leds-bd2802.c
drivers/leds/leds-blinkm.c
drivers/leds/leds-lm3530.c
drivers/leds/leds-lm3532.c
drivers/leds/leds-lm3642.c
drivers/leds/leds-lm3697.c
drivers/leds/leds-lp3944.c
drivers/leds/leds-lp3952.c
drivers/leds/leds-lp5521.c
drivers/leds/leds-lp5562.c
drivers/leds/leds-lp8501.c
drivers/leds/leds-lp8860.c
drivers/leds/leds-turris-omnia.c

index 12c2609c11372426ad5359e64203a6fb46258bb4..2c6ef321b7c803ab15e6dddabf50e4c34710ee8d 100644 (file)
@@ -743,8 +743,8 @@ static void as3645a_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id as3645a_id_table[] = {
-       { AS_NAME, 0 },
-       { },
+       { AS_NAME },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, as3645a_id_table);
 
index decfca447d8a7ac579aacdf44e6cf1c48f63ca1b..a42cc4bc6917108460b189b275095e242b5fdb14 100644 (file)
@@ -331,8 +331,8 @@ 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", 0 },
-       { /* sentinel */ },
+       { "an30259a" },
+       { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(i2c, an30259a_id);
 
index 0792ea126cea0d299e7b3401fe20fc2e6a4e750d..2a08c5f2760898696188782870aaaee3238c4bd2 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", 0 },
+       { "BD2802" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, bd2802_id);
index 2782da1a19307fa18ff73e8ca2cb7f154db7427a..e40b87aead2dfd981f3e5fbaf5ab90870cf0c85e 100644 (file)
@@ -718,7 +718,7 @@ static void blinkm_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id blinkm_id[] = {
-       {"blinkm", 0},
+       { "blinkm" },
        {}
 };
 
index a2feef8e4ac5ff86364c00dde96b11dc1cf2e85f..e44a3db106c3ca037a37354d0f4d771b614d3f4f 100644 (file)
@@ -478,7 +478,7 @@ static void lm3530_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lm3530_id[] = {
-       {LM3530_NAME, 0},
+       { LM3530_NAME },
        {}
 };
 MODULE_DEVICE_TABLE(i2c, lm3530_id);
index 8c90701dc50de5eac195c877fe4fa5b7afef3185..54b5650877f700d3d400709aff94e9bc4ff8a821 100644 (file)
@@ -726,7 +726,7 @@ 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, 0},
+       { LM3532_NAME },
        {}
 };
 MODULE_DEVICE_TABLE(i2c, lm3532_id);
index 6eee52e211be738897ed8218b1323903f97a1816..61629d5d67033c9ff8044061baafaaf1d75abcbb 100644 (file)
@@ -390,7 +390,7 @@ static void lm3642_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lm3642_id[] = {
-       {LM3642_NAME, 0},
+       { LM3642_NAME },
        {}
 };
 
index 380d17a58fe934cdc5ba5f2cafdc73ef8a0fd6fc..99de2a3317271a338995489eb5a1f55cf96487df 100644 (file)
@@ -360,7 +360,7 @@ static void lm3697_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lm3697_id[] = {
-       { "lm3697", 0 },
+       { "lm3697" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lm3697_id);
index 8ea746c499d196a9c0a22e2fbbc8c8e831fc82e3..ccfeee49ea78c44a5500a79c7fb540d6ee55f663 100644 (file)
@@ -417,7 +417,7 @@ static void lp3944_remove(struct i2c_client *client)
 
 /* lp3944 i2c driver struct */
 static const struct i2c_device_id lp3944_id[] = {
-       {"lp3944", 0},
+       { "lp3944" },
        {}
 };
 
index ff7bae2447dd1b65f3c92a9ec8a53b4d2c8b60e9..17219a5827045fa9b1e519afe77faea0648be905 100644 (file)
@@ -266,7 +266,7 @@ static int lp3952_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lp3952_id[] = {
-       {LP3952_NAME, 0},
+       { LP3952_NAME },
        {}
 };
 MODULE_DEVICE_TABLE(i2c, lp3952_id);
index f9c8b568b6525416b8d806835e045d6a99b0da9d..d242c12e75694b1b1d62d38d090f1d26d77e106e 100644 (file)
@@ -591,7 +591,7 @@ static void lp5521_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lp5521_id[] = {
-       { "lp5521", 0 }, /* Three channel chip */
+       { "lp5521" }, /* Three channel chip */
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lp5521_id);
index 39db9aeb67c5c2f40565cf48d20f8a9e9132a65a..e545ca8bd1f6cccd6db5667365495ea889b23d62 100644 (file)
@@ -584,7 +584,7 @@ static void lp5562_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lp5562_id[] = {
-       { "lp5562", 0 },
+       { "lp5562" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lp5562_id);
index ac50aa88939a3e71351bfe1fd2bb60ecf4df0125..68b5c7ae31b9c21931ded516345fc738c610baa2 100644 (file)
@@ -375,7 +375,7 @@ static void lp8501_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lp8501_id[] = {
-       { "lp8501",  0 },
+       { "lp8501" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lp8501_id);
index 19b621012e582fce00c983e3e2b4b2e20f09f14c..7a136fd81720618fbef07ed3fe3ea93448750399 100644 (file)
@@ -459,7 +459,7 @@ static void lp8860_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id lp8860_id[] = {
-       { "lp8860", 0 },
+       { "lp8860" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, lp8860_id);
index b443f8c989fa354d46210af463360d734f959461..39f740be058f1464cbd60919da658f524da8f829 100644 (file)
@@ -534,7 +534,7 @@ static const struct of_device_id of_omnia_leds_match[] = {
 };
 
 static const struct i2c_device_id omnia_id[] = {
-       { "omnia", 0 },
+       { "omnia" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, omnia_id);