]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
hwmon: Drop explicit initialization of struct i2c_device_id::driver_data to 0
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Wed, 18 Sep 2024 12:31:49 +0000 (14:31 +0200)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 10 Nov 2024 22:48:05 +0000 (14:48 -0800)
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 touching these structs, also remove commas after the sentinel
entries and use a consistent indention style.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Message-ID: <20240918123150.1540161-7-u.kleine-koenig@baylibre.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/amc6821.c
drivers/hwmon/pmbus/mp2891.c
drivers/hwmon/pmbus/mp2993.c
drivers/hwmon/pmbus/mp9941.c
drivers/hwmon/sg2042-mcu.c
drivers/hwmon/spd5118.c

index ac64b407ed0eaf6112c9bb3caccae2e5f7e27015..e86027f850c90cebb90ca59f0b05821839afdb3b 100644 (file)
@@ -927,7 +927,7 @@ static int amc6821_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id amc6821_id[] = {
-       { "amc6821", 0 },
+       { "amc6821" },
        { }
 };
 
index bb28b15a910384ab58d948ac2d729b8f227290aa..94ab4ae5fba0b486f95d48668a33d4fcdeed6108 100644 (file)
@@ -572,8 +572,8 @@ static int mp2891_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id mp2891_id[] = {
-       {"mp2891", 0},
-       {}
+       { "mp2891" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, mp2891_id);
 
index 944593e13231faba536300ea80681c96c64f657f..63691dac2281d89274a31f812c372a9be4b65cd6 100644 (file)
@@ -233,8 +233,8 @@ static int mp2993_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id mp2993_id[] = {
-       {"mp2993", 0},
-       {}
+       { "mp2993" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, mp2993_id);
 
index 543955cfce67e80399ad455712478cdf6a6a362c..8ab5fc4d409260e16c8c9acc312345d70b3fb2db 100644 (file)
@@ -291,8 +291,8 @@ static int mp9941_probe(struct i2c_client *client)
 }
 
 static const struct i2c_device_id mp9941_id[] = {
-       {"mp9941", 0},
-       {}
+       { "mp9941" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, mp9941_id);
 
index 1410457693545be108082489f1251ecb26bcc14f..aa3fb773602c9e9deac379767b5aaade5b301a11 100644 (file)
@@ -346,8 +346,8 @@ static void sg2042_mcu_i2c_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id sg2042_mcu_id[] = {
-       { "sg2042-hwmon-mcu", 0 },
-       {},
+       { "sg2042-hwmon-mcu" },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, sg2042_mcu_id);
 
index fcbce5a01e5580afc54946dcc5eb168a2743473e..6cee48a3e5c33e62073dcaa47c916363f79f469d 100644 (file)
@@ -671,7 +671,7 @@ static int spd5118_resume(struct device *dev)
 static DEFINE_SIMPLE_DEV_PM_OPS(spd5118_pm_ops, spd5118_suspend, spd5118_resume);
 
 static const struct i2c_device_id spd5118_id[] = {
-       { "spd5118", 0 },
+       { "spd5118" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, spd5118_id);