Skip to content

Commit bfd3587

Browse files
ukleineklag-linaro
authored andcommitted
backlight: 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: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 7857f5c commit bfd3587

File tree

8 files changed

+12
-9
lines changed

8 files changed

+12
-9
lines changed

drivers/video/backlight/adp8870_bl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ static SIMPLE_DEV_PM_OPS(adp8870_i2c_pm_ops, adp8870_i2c_suspend,
963963
adp8870_i2c_resume);
964964

965965
static const struct i2c_device_id adp8870_id[] = {
966-
{ "adp8870", 0 },
966+
{ "adp8870" },
967967
{ }
968968
};
969969
MODULE_DEVICE_TABLE(i2c, adp8870_id);

drivers/video/backlight/bd6107.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static void bd6107_remove(struct i2c_client *client)
180180
}
181181

182182
static const struct i2c_device_id bd6107_ids[] = {
183-
{ "bd6107", 0 },
183+
{ "bd6107" },
184184
{ }
185185
};
186186
MODULE_DEVICE_TABLE(i2c, bd6107_ids);

drivers/video/backlight/ktz8866.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ static void ktz8866_remove(struct i2c_client *client)
179179
}
180180

181181
static const struct i2c_device_id ktz8866_ids[] = {
182-
{ "ktz8866", 0 },
183-
{},
182+
{ "ktz8866" },
183+
{}
184184
};
185185
MODULE_DEVICE_TABLE(i2c, ktz8866_ids);
186186

drivers/video/backlight/lm3509_bl.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,10 @@ static void lm3509_remove(struct i2c_client *client)
311311
regmap_write(data->regmap, REG_GP, 0x00);
312312
}
313313

314-
static const struct i2c_device_id lm3509_id[] = { { LM3509_NAME, 0 }, {} };
314+
static const struct i2c_device_id lm3509_id[] = {
315+
{ LM3509_NAME },
316+
{}
317+
};
315318

316319
MODULE_DEVICE_TABLE(i2c, lm3509_id);
317320

drivers/video/backlight/lm3630a_bl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ static void lm3630a_remove(struct i2c_client *client)
596596
}
597597

598598
static const struct i2c_device_id lm3630a_id[] = {
599-
{LM3630A_NAME, 0},
599+
{ LM3630A_NAME },
600600
{}
601601
};
602602

drivers/video/backlight/lm3639_bl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ static void lm3639_remove(struct i2c_client *client)
403403
}
404404

405405
static const struct i2c_device_id lm3639_id[] = {
406-
{LM3639_NAME, 0},
406+
{ LM3639_NAME },
407407
{}
408408
};
409409

drivers/video/backlight/lv5207lp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ static void lv5207lp_remove(struct i2c_client *client)
132132
}
133133

134134
static const struct i2c_device_id lv5207lp_ids[] = {
135-
{ "lv5207lp", 0 },
135+
{ "lv5207lp" },
136136
{ }
137137
};
138138
MODULE_DEVICE_TABLE(i2c, lv5207lp_ids);

drivers/video/backlight/mp3309c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ static const struct of_device_id mp3309c_match_table[] = {
400400
MODULE_DEVICE_TABLE(of, mp3309c_match_table);
401401

402402
static const struct i2c_device_id mp3309c_id[] = {
403-
{ "mp3309c", 0 },
403+
{ "mp3309c" },
404404
{ }
405405
};
406406
MODULE_DEVICE_TABLE(i2c, mp3309c_id);

0 commit comments

Comments
 (0)