Commit c0e3d2be authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Lee Jones

leds: Drop explicit initialization of struct i2c_device_id::driver_data to 0

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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20240522165358.62238-2-u.kleine-koenig@pengutronix.deSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent b1bbd20f
...@@ -743,8 +743,8 @@ static void as3645a_remove(struct i2c_client *client) ...@@ -743,8 +743,8 @@ static void as3645a_remove(struct i2c_client *client)
} }
static const struct i2c_device_id as3645a_id_table[] = { static const struct i2c_device_id as3645a_id_table[] = {
{ AS_NAME, 0 }, { AS_NAME },
{ }, { }
}; };
MODULE_DEVICE_TABLE(i2c, as3645a_id_table); MODULE_DEVICE_TABLE(i2c, as3645a_id_table);
......
...@@ -331,8 +331,8 @@ static const struct of_device_id an30259a_match_table[] = { ...@@ -331,8 +331,8 @@ static const struct of_device_id an30259a_match_table[] = {
MODULE_DEVICE_TABLE(of, an30259a_match_table); MODULE_DEVICE_TABLE(of, an30259a_match_table);
static const struct i2c_device_id an30259a_id[] = { static const struct i2c_device_id an30259a_id[] = {
{ "an30259a", 0 }, { "an30259a" },
{ /* sentinel */ }, { /* sentinel */ }
}; };
MODULE_DEVICE_TABLE(i2c, an30259a_id); MODULE_DEVICE_TABLE(i2c, an30259a_id);
......
...@@ -776,7 +776,7 @@ static int bd2802_resume(struct device *dev) ...@@ -776,7 +776,7 @@ static int bd2802_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(bd2802_pm, bd2802_suspend, bd2802_resume); static SIMPLE_DEV_PM_OPS(bd2802_pm, bd2802_suspend, bd2802_resume);
static const struct i2c_device_id bd2802_id[] = { static const struct i2c_device_id bd2802_id[] = {
{ "BD2802", 0 }, { "BD2802" },
{ } { }
}; };
MODULE_DEVICE_TABLE(i2c, bd2802_id); MODULE_DEVICE_TABLE(i2c, bd2802_id);
......
...@@ -718,7 +718,7 @@ static void blinkm_remove(struct i2c_client *client) ...@@ -718,7 +718,7 @@ static void blinkm_remove(struct i2c_client *client)
} }
static const struct i2c_device_id blinkm_id[] = { static const struct i2c_device_id blinkm_id[] = {
{"blinkm", 0}, { "blinkm" },
{} {}
}; };
......
...@@ -478,7 +478,7 @@ static void lm3530_remove(struct i2c_client *client) ...@@ -478,7 +478,7 @@ static void lm3530_remove(struct i2c_client *client)
} }
static const struct i2c_device_id lm3530_id[] = { static const struct i2c_device_id lm3530_id[] = {
{LM3530_NAME, 0}, { LM3530_NAME },
{} {}
}; };
MODULE_DEVICE_TABLE(i2c, lm3530_id); MODULE_DEVICE_TABLE(i2c, lm3530_id);
......
...@@ -726,7 +726,7 @@ static const struct of_device_id of_lm3532_leds_match[] = { ...@@ -726,7 +726,7 @@ static const struct of_device_id of_lm3532_leds_match[] = {
MODULE_DEVICE_TABLE(of, of_lm3532_leds_match); MODULE_DEVICE_TABLE(of, of_lm3532_leds_match);
static const struct i2c_device_id lm3532_id[] = { static const struct i2c_device_id lm3532_id[] = {
{LM3532_NAME, 0}, { LM3532_NAME },
{} {}
}; };
MODULE_DEVICE_TABLE(i2c, lm3532_id); MODULE_DEVICE_TABLE(i2c, lm3532_id);
......
...@@ -390,7 +390,7 @@ static void lm3642_remove(struct i2c_client *client) ...@@ -390,7 +390,7 @@ static void lm3642_remove(struct i2c_client *client)
} }
static const struct i2c_device_id lm3642_id[] = { static const struct i2c_device_id lm3642_id[] = {
{LM3642_NAME, 0}, { LM3642_NAME },
{} {}
}; };
......
...@@ -360,7 +360,7 @@ static void lm3697_remove(struct i2c_client *client) ...@@ -360,7 +360,7 @@ static void lm3697_remove(struct i2c_client *client)
} }
static const struct i2c_device_id lm3697_id[] = { static const struct i2c_device_id lm3697_id[] = {
{ "lm3697", 0 }, { "lm3697" },
{ } { }
}; };
MODULE_DEVICE_TABLE(i2c, lm3697_id); MODULE_DEVICE_TABLE(i2c, lm3697_id);
......
...@@ -417,7 +417,7 @@ static void lp3944_remove(struct i2c_client *client) ...@@ -417,7 +417,7 @@ static void lp3944_remove(struct i2c_client *client)
/* lp3944 i2c driver struct */ /* lp3944 i2c driver struct */
static const struct i2c_device_id lp3944_id[] = { static const struct i2c_device_id lp3944_id[] = {
{"lp3944", 0}, { "lp3944" },
{} {}
}; };
......
...@@ -266,7 +266,7 @@ static int lp3952_probe(struct i2c_client *client) ...@@ -266,7 +266,7 @@ static int lp3952_probe(struct i2c_client *client)
} }
static const struct i2c_device_id lp3952_id[] = { static const struct i2c_device_id lp3952_id[] = {
{LP3952_NAME, 0}, { LP3952_NAME },
{} {}
}; };
MODULE_DEVICE_TABLE(i2c, lp3952_id); MODULE_DEVICE_TABLE(i2c, lp3952_id);
......
...@@ -591,7 +591,7 @@ static void lp5521_remove(struct i2c_client *client) ...@@ -591,7 +591,7 @@ static void lp5521_remove(struct i2c_client *client)
} }
static const struct i2c_device_id lp5521_id[] = { static const struct i2c_device_id lp5521_id[] = {
{ "lp5521", 0 }, /* Three channel chip */ { "lp5521" }, /* Three channel chip */
{ } { }
}; };
MODULE_DEVICE_TABLE(i2c, lp5521_id); MODULE_DEVICE_TABLE(i2c, lp5521_id);
......
...@@ -584,7 +584,7 @@ static void lp5562_remove(struct i2c_client *client) ...@@ -584,7 +584,7 @@ static void lp5562_remove(struct i2c_client *client)
} }
static const struct i2c_device_id lp5562_id[] = { static const struct i2c_device_id lp5562_id[] = {
{ "lp5562", 0 }, { "lp5562" },
{ } { }
}; };
MODULE_DEVICE_TABLE(i2c, lp5562_id); MODULE_DEVICE_TABLE(i2c, lp5562_id);
......
...@@ -375,7 +375,7 @@ static void lp8501_remove(struct i2c_client *client) ...@@ -375,7 +375,7 @@ static void lp8501_remove(struct i2c_client *client)
} }
static const struct i2c_device_id lp8501_id[] = { static const struct i2c_device_id lp8501_id[] = {
{ "lp8501", 0 }, { "lp8501" },
{ } { }
}; };
MODULE_DEVICE_TABLE(i2c, lp8501_id); MODULE_DEVICE_TABLE(i2c, lp8501_id);
......
...@@ -459,7 +459,7 @@ static void lp8860_remove(struct i2c_client *client) ...@@ -459,7 +459,7 @@ static void lp8860_remove(struct i2c_client *client)
} }
static const struct i2c_device_id lp8860_id[] = { static const struct i2c_device_id lp8860_id[] = {
{ "lp8860", 0 }, { "lp8860" },
{ } { }
}; };
MODULE_DEVICE_TABLE(i2c, lp8860_id); MODULE_DEVICE_TABLE(i2c, lp8860_id);
......
...@@ -534,7 +534,7 @@ static const struct of_device_id of_omnia_leds_match[] = { ...@@ -534,7 +534,7 @@ static const struct of_device_id of_omnia_leds_match[] = {
}; };
static const struct i2c_device_id omnia_id[] = { static const struct i2c_device_id omnia_id[] = {
{ "omnia", 0 }, { "omnia" },
{ } { }
}; };
MODULE_DEVICE_TABLE(i2c, omnia_id); MODULE_DEVICE_TABLE(i2c, omnia_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment