Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Uwe 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: Tzung-Bi Shih <tzungbi@kernel.org>

authored by

Uwe Kleine-König and committed by
Tzung-Bi Shih
7cbf2899 9852d85e

+2 -2
+1 -1
drivers/platform/chrome/cros_ec_i2c.c
··· 352 352 #endif 353 353 354 354 static const struct i2c_device_id cros_ec_i2c_id[] = { 355 - { "cros-ec-i2c", 0 }, 355 + { "cros-ec-i2c" }, 356 356 { } 357 357 }; 358 358 MODULE_DEVICE_TABLE(i2c, cros_ec_i2c_id);
+1 -1
drivers/platform/chrome/cros_hps_i2c.c
··· 129 129 static DEFINE_RUNTIME_DEV_PM_OPS(hps_pm_ops, hps_suspend, hps_resume, NULL); 130 130 131 131 static const struct i2c_device_id hps_i2c_id[] = { 132 - { "cros-hps", 0 }, 132 + { "cros-hps" }, 133 133 { } 134 134 }; 135 135 MODULE_DEVICE_TABLE(i2c, hps_i2c_id);