Message ID | 20240522165358.62238-2-u.kleine-koenig@pengutronix.de |
---|---|
State | New |
Headers | show |
Series | leds: Drop explicit initialization of struct i2c_device_id::driver_data to 0 | expand |
On Wed, 22 May 2024 18:53:59 +0200, Uwe Kleine-König wrote: > 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. > > [...] Applied, thanks! [1/1] leds: Drop explicit initialization of struct i2c_device_id::driver_data to 0 commit: 4e84d53d7bf0fc35978fd41605d6d377c17a369b -- Lee Jones [李琼斯]
diff --git a/drivers/leds/flash/leds-as3645a.c b/drivers/leds/flash/leds-as3645a.c index 12c2609c1137..2c6ef321b7c8 100644 --- a/drivers/leds/flash/leds-as3645a.c +++ b/drivers/leds/flash/leds-as3645a.c @@ -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); diff --git a/drivers/leds/leds-an30259a.c b/drivers/leds/leds-an30259a.c index decfca447d8a..a42cc4bc6917 100644 --- a/drivers/leds/leds-an30259a.c +++ b/drivers/leds/leds-an30259a.c @@ -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); diff --git a/drivers/leds/leds-bd2802.c b/drivers/leds/leds-bd2802.c index 0792ea126cea..2a08c5f27608 100644 --- a/drivers/leds/leds-bd2802.c +++ b/drivers/leds/leds-bd2802.c @@ -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); diff --git a/drivers/leds/leds-blinkm.c b/drivers/leds/leds-blinkm.c index 2782da1a1930..e40b87aead2d 100644 --- a/drivers/leds/leds-blinkm.c +++ b/drivers/leds/leds-blinkm.c @@ -718,7 +718,7 @@ static void blinkm_remove(struct i2c_client *client) } static const struct i2c_device_id blinkm_id[] = { - {"blinkm", 0}, + { "blinkm" }, {} }; diff --git a/drivers/leds/leds-lm3530.c b/drivers/leds/leds-lm3530.c index a2feef8e4ac5..e44a3db106c3 100644 --- a/drivers/leds/leds-lm3530.c +++ b/drivers/leds/leds-lm3530.c @@ -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); diff --git a/drivers/leds/leds-lm3532.c b/drivers/leds/leds-lm3532.c index 8c90701dc50d..54b5650877f7 100644 --- a/drivers/leds/leds-lm3532.c +++ b/drivers/leds/leds-lm3532.c @@ -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); diff --git a/drivers/leds/leds-lm3642.c b/drivers/leds/leds-lm3642.c index 6eee52e211be..61629d5d6703 100644 --- a/drivers/leds/leds-lm3642.c +++ b/drivers/leds/leds-lm3642.c @@ -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 }, {} }; diff --git a/drivers/leds/leds-lm3697.c b/drivers/leds/leds-lm3697.c index 380d17a58fe9..99de2a331727 100644 --- a/drivers/leds/leds-lm3697.c +++ b/drivers/leds/leds-lm3697.c @@ -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); diff --git a/drivers/leds/leds-lp3944.c b/drivers/leds/leds-lp3944.c index 8ea746c499d1..ccfeee49ea78 100644 --- a/drivers/leds/leds-lp3944.c +++ b/drivers/leds/leds-lp3944.c @@ -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" }, {} }; diff --git a/drivers/leds/leds-lp3952.c b/drivers/leds/leds-lp3952.c index ff7bae2447dd..17219a582704 100644 --- a/drivers/leds/leds-lp3952.c +++ b/drivers/leds/leds-lp3952.c @@ -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); diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index f9c8b568b652..d242c12e7569 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c @@ -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); diff --git a/drivers/leds/leds-lp5562.c b/drivers/leds/leds-lp5562.c index 39db9aeb67c5..e545ca8bd1f6 100644 --- a/drivers/leds/leds-lp5562.c +++ b/drivers/leds/leds-lp5562.c @@ -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); diff --git a/drivers/leds/leds-lp8501.c b/drivers/leds/leds-lp8501.c index ac50aa88939a..68b5c7ae31b9 100644 --- a/drivers/leds/leds-lp8501.c +++ b/drivers/leds/leds-lp8501.c @@ -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); diff --git a/drivers/leds/leds-lp8860.c b/drivers/leds/leds-lp8860.c index 19b621012e58..7a136fd81720 100644 --- a/drivers/leds/leds-lp8860.c +++ b/drivers/leds/leds-lp8860.c @@ -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); diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c index b443f8c989fa..39f740be058f 100644 --- a/drivers/leds/leds-turris-omnia.c +++ b/drivers/leds/leds-turris-omnia.c @@ -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);
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> --- drivers/leds/flash/leds-as3645a.c | 4 ++-- drivers/leds/leds-an30259a.c | 4 ++-- drivers/leds/leds-bd2802.c | 2 +- drivers/leds/leds-blinkm.c | 2 +- drivers/leds/leds-lm3530.c | 2 +- drivers/leds/leds-lm3532.c | 2 +- drivers/leds/leds-lm3642.c | 2 +- drivers/leds/leds-lm3697.c | 2 +- drivers/leds/leds-lp3944.c | 2 +- drivers/leds/leds-lp3952.c | 2 +- drivers/leds/leds-lp5521.c | 2 +- drivers/leds/leds-lp5562.c | 2 +- drivers/leds/leds-lp8501.c | 2 +- drivers/leds/leds-lp8860.c | 2 +- drivers/leds/leds-turris-omnia.c | 2 +- 15 files changed, 17 insertions(+), 17 deletions(-) base-commit: 8314289a8d50a4e05d8ece1ae0445a3b57bb4d3b