]> Git Repo - J-linux.git/commitdiff
ipmi: Drop explicit initialization of struct i2c_device_id::driver_data to 0
authorUwe Kleine-König <[email protected]>
Mon, 8 Jul 2024 15:09:12 +0000 (17:09 +0200)
committerCorey Minyard <[email protected]>
Mon, 8 Jul 2024 20:05:18 +0000 (15:05 -0500)
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 at it, also remove commas after the sentinel entries.

Signed-off-by: Uwe Kleine-König <[email protected]>
Message-Id: <20240708150914[email protected]>
Signed-off-by: Corey Minyard <[email protected]>
drivers/char/ipmi/ipmb_dev_int.c
drivers/char/ipmi/ipmi_ipmb.c
drivers/char/ipmi/ipmi_ssif.c
drivers/char/ipmi/ssif_bmc.c

index 49100845fcb7bbd4569de6b7cb62aecb808cbb33..7296127181eca330f0bff5f56631e4e64473e190 100644 (file)
@@ -350,8 +350,8 @@ static void ipmb_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id ipmb_id[] = {
-       { "ipmb-dev", 0 },
-       {},
+       { "ipmb-dev" },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, ipmb_id);
 
index 4e335832fc264e1ea528a7bed6b09759ea949b01..6a4f279c7c1f5381625278fd3d588030900eff65 100644 (file)
@@ -561,8 +561,8 @@ MODULE_DEVICE_TABLE(of, of_ipmi_ipmb_match);
 #endif
 
 static const struct i2c_device_id ipmi_ipmb_id[] = {
-       { DEVICE_NAME, 0 },
-       {},
+       { DEVICE_NAME },
+       {}
 };
 MODULE_DEVICE_TABLE(i2c, ipmi_ipmb_id);
 
index 3f509a22217b3f79d2044f2717c672408ef9e246..96ad571d041a95999ec137469358f9e9cbde9702 100644 (file)
@@ -2049,7 +2049,7 @@ static int dmi_ipmi_probe(struct platform_device *pdev)
 #endif
 
 static const struct i2c_device_id ssif_id[] = {
-       { DEVICE_NAME, 0 },
+       { DEVICE_NAME },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, ssif_id);
index ab4e87a99f087474e3527498138ab64b11cab607..a14fafc583d4d82ad27f69010ecd3339ab6bda14 100644 (file)
@@ -852,8 +852,8 @@ static const struct of_device_id ssif_bmc_match[] = {
 MODULE_DEVICE_TABLE(of, ssif_bmc_match);
 
 static const struct i2c_device_id ssif_bmc_id[] = {
-       { DEVICE_NAME, 0 },
-       { },
+       { DEVICE_NAME },
+       { }
 };
 MODULE_DEVICE_TABLE(i2c, ssif_bmc_id);
 
This page took 0.058262 seconds and 4 git commands to generate.