Skip to content

Commit 2fa3659

Browse files
Uwe Kleine-Königgroeck
authored andcommitted
hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0 (part 2)
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. This is a follow up to commit d8a66f3 ("hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0") which I created before identifying a few corner cases in my conversion script. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 6a81578 commit 2fa3659

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

drivers/hwmon/lm87.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -976,7 +976,7 @@ static int lm87_probe(struct i2c_client *client)
976976

977977
static const struct i2c_device_id lm87_id[] = {
978978
{ "lm87" },
979-
{ "adm1024", 0 },
979+
{ "adm1024" },
980980
{ }
981981
};
982982
MODULE_DEVICE_TABLE(i2c, lm87_id);

drivers/hwmon/lm95241.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ static int lm95241_probe(struct i2c_client *client)
458458
/* Driver data (common to all clients) */
459459
static const struct i2c_device_id lm95241_id[] = {
460460
{ "lm95231" },
461-
{ "lm95241", 0 },
461+
{ "lm95241" },
462462
{ }
463463
};
464464
MODULE_DEVICE_TABLE(i2c, lm95241_id);

drivers/hwmon/max6621.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ static int max6621_probe(struct i2c_client *client)
537537
}
538538

539539
static const struct i2c_device_id max6621_id[] = {
540-
{ MAX6621_DRV_NAME, 0 },
540+
{ MAX6621_DRV_NAME },
541541
{ }
542542
};
543543
MODULE_DEVICE_TABLE(i2c, max6621_id);

drivers/hwmon/pmbus/max15301.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
#include "pmbus.h"
2424

2525
static const struct i2c_device_id max15301_id[] = {
26-
{"bmr461"},
27-
{"max15301", 0},
26+
{ "bmr461" },
27+
{ "max15301" },
2828
{}
2929
};
3030
MODULE_DEVICE_TABLE(i2c, max15301_id);

0 commit comments

Comments
 (0)