Skip to content

Commit 2fa3659

Browse files
Uwe Kleine-Königgroeck
Uwe Kleine-König
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 <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20240508072027.2119857-2-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
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

+1-1
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

+1-1
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

+1-1
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

+2-2
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)