Commit 7cbf2899 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Tzung-Bi Shih
Browse files

platform/chrome: Drop explicit initialization of struct i2c_device_id::driver_data to 0



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: default avatarUwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20240920151445.499933-2-u.kleine-koenig@baylibre.com


Signed-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
parent 9852d85e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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);