Skip to content

Commit b45c696

Browse files
ukleinekgregkh
authored andcommitted
misc: 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: Greg Kroah-Hartman <[email protected]>
1 parent 822d733 commit b45c696

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed

drivers/misc/apds9802als.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ static UNIVERSAL_DEV_PM_OPS(apds9802als_pm_ops, apds9802als_suspend,
285285
#endif /* CONFIG_PM */
286286

287287
static const struct i2c_device_id apds9802als_id[] = {
288-
{ DRIVER_NAME, 0 },
288+
{ DRIVER_NAME },
289289
{ }
290290
};
291291

drivers/misc/apds990x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,7 @@ static int apds990x_runtime_resume(struct device *dev)
12531253
#endif
12541254

12551255
static const struct i2c_device_id apds990x_id[] = {
1256-
{"apds990x", 0 },
1256+
{ "apds990x" },
12571257
{}
12581258
};
12591259

drivers/misc/bh1770glc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,8 +1361,8 @@ static int bh1770_runtime_resume(struct device *dev)
13611361
#endif
13621362

13631363
static const struct i2c_device_id bh1770_id[] = {
1364-
{"bh1770glc", 0 },
1365-
{"sfh7770", 0 },
1364+
{ "bh1770glc" },
1365+
{ "sfh7770" },
13661366
{}
13671367
};
13681368

drivers/misc/ds1682.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ static void ds1682_remove(struct i2c_client *client)
271271
}
272272

273273
static const struct i2c_device_id ds1682_id[] = {
274-
{ "ds1682", 0 },
274+
{ "ds1682" },
275275
{ }
276276
};
277277
MODULE_DEVICE_TABLE(i2c, ds1682_id);

drivers/misc/hmc6352.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static void hmc6352_remove(struct i2c_client *client)
121121
}
122122

123123
static const struct i2c_device_id hmc6352_id[] = {
124-
{ "hmc6352", 0 },
124+
{ "hmc6352" },
125125
{ }
126126
};
127127

drivers/misc/ics932s401.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static int ics932s401_detect(struct i2c_client *client,
9595
static void ics932s401_remove(struct i2c_client *client);
9696

9797
static const struct i2c_device_id ics932s401_id[] = {
98-
{ "ics932s401", 0 },
98+
{ "ics932s401" },
9999
{ }
100100
};
101101
MODULE_DEVICE_TABLE(i2c, ics932s401_id);

drivers/misc/isl29003.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ static SIMPLE_DEV_PM_OPS(isl29003_pm_ops, isl29003_suspend, isl29003_resume);
449449
#endif /* CONFIG_PM_SLEEP */
450450

451451
static const struct i2c_device_id isl29003_id[] = {
452-
{ "isl29003", 0 },
452+
{ "isl29003" },
453453
{}
454454
};
455455
MODULE_DEVICE_TABLE(i2c, isl29003_id);

drivers/misc/isl29020.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static void isl29020_remove(struct i2c_client *client)
177177
}
178178

179179
static const struct i2c_device_id isl29020_id[] = {
180-
{ "isl29020", 0 },
180+
{ "isl29020" },
181181
{ }
182182
};
183183

drivers/misc/tsl2550.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ static SIMPLE_DEV_PM_OPS(tsl2550_pm_ops, tsl2550_suspend, tsl2550_resume);
420420
#endif /* CONFIG_PM_SLEEP */
421421

422422
static const struct i2c_device_id tsl2550_id[] = {
423-
{ "tsl2550", 0 },
423+
{ "tsl2550" },
424424
{ }
425425
};
426426
MODULE_DEVICE_TABLE(i2c, tsl2550_id);

0 commit comments

Comments
 (0)