]> Git Repo - J-linux.git/commitdiff
platform/chrome: Drop explicit initialization of struct i2c_device_id::driver_data...
authorUwe Kleine-König <[email protected]>
Fri, 20 Sep 2024 15:14:44 +0000 (17:14 +0200)
committerTzung-Bi Shih <[email protected]>
Mon, 30 Sep 2024 01:34:01 +0000 (01:34 +0000)
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.

Signed-off-by: Uwe Kleine-König <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Tzung-Bi Shih <[email protected]>
drivers/platform/chrome/cros_ec_i2c.c
drivers/platform/chrome/cros_hps_i2c.c

index e29c51cbfd71b46bea6801499e72754ee93a0060..62662ba5bf6e76c5df96ebbab442d763ba407aa0 100644 (file)
@@ -352,7 +352,7 @@ MODULE_DEVICE_TABLE(of, cros_ec_i2c_of_match);
 #endif
 
 static const struct i2c_device_id cros_ec_i2c_id[] = {
-       { "cros-ec-i2c", 0 },
+       { "cros-ec-i2c" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, cros_ec_i2c_id);
index dd14957ec39fc4e4620edb45db6d6125ba3c1995..6b479cfe3f73a5e286d163a31f9d764a68bdd877 100644 (file)
@@ -129,7 +129,7 @@ static int hps_resume(struct device *dev)
 static DEFINE_RUNTIME_DEV_PM_OPS(hps_pm_ops, hps_suspend, hps_resume, NULL);
 
 static const struct i2c_device_id hps_i2c_id[] = {
-       { "cros-hps", 0 },
+       { "cros-hps" },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, hps_i2c_id);
This page took 0.052463 seconds and 4 git commands to generate.