Input: 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. While add it, also remove commas after the sentinel entries. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20240509174158.2211071-2-u.kleine-koenig@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
committed by
Dmitry Torokhov
parent
adb2e48afc
commit
5852f2afcd
@@ -72,11 +72,11 @@ static int ad714x_i2c_probe(struct i2c_client *client)
|
||||
}
|
||||
|
||||
static const struct i2c_device_id ad714x_id[] = {
|
||||
{ "ad7142_captouch", 0 },
|
||||
{ "ad7143_captouch", 0 },
|
||||
{ "ad7147_captouch", 0 },
|
||||
{ "ad7147a_captouch", 0 },
|
||||
{ "ad7148_captouch", 0 },
|
||||
{ "ad7142_captouch" },
|
||||
{ "ad7143_captouch" },
|
||||
{ "ad7147_captouch" },
|
||||
{ "ad7147a_captouch" },
|
||||
{ "ad7148_captouch" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, ad714x_id);
|
||||
|
||||
@@ -106,7 +106,7 @@ static void adxl34x_i2c_remove(struct i2c_client *client)
|
||||
}
|
||||
|
||||
static const struct i2c_device_id adxl34x_id[] = {
|
||||
{ "adxl34x", 0 },
|
||||
{ "adxl34x" },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ static void apanel_shutdown(struct i2c_client *client)
|
||||
}
|
||||
|
||||
static const struct i2c_device_id apanel_id[] = {
|
||||
{ "fujitsu_apanel", 0 },
|
||||
{ "fujitsu_apanel" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, apanel_id);
|
||||
|
||||
@@ -257,7 +257,7 @@ static const struct of_device_id atmel_captouch_of_id[] = {
|
||||
MODULE_DEVICE_TABLE(of, atmel_captouch_of_id);
|
||||
|
||||
static const struct i2c_device_id atmel_captouch_id[] = {
|
||||
{ "atmel_captouch", 0 },
|
||||
{ "atmel_captouch" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, atmel_captouch_id);
|
||||
|
||||
@@ -536,9 +536,9 @@ static int __maybe_unused bma150_resume(struct device *dev)
|
||||
static UNIVERSAL_DEV_PM_OPS(bma150_pm, bma150_suspend, bma150_resume, NULL);
|
||||
|
||||
static const struct i2c_device_id bma150_id[] = {
|
||||
{ "bma150", 0 },
|
||||
{ "smb380", 0 },
|
||||
{ "bma023", 0 },
|
||||
{ "bma150" },
|
||||
{ "smb380" },
|
||||
{ "bma023" },
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
@@ -90,8 +90,8 @@ static const struct dev_pm_ops cma3000_i2c_pm_ops = {
|
||||
};
|
||||
|
||||
static const struct i2c_device_id cma3000_i2c_id[] = {
|
||||
{ "cma3000_d01", 0 },
|
||||
{ },
|
||||
{ "cma3000_d01" },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(i2c, cma3000_i2c_id);
|
||||
|
||||
@@ -600,7 +600,7 @@ out:
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(drv260x_pm_ops, drv260x_suspend, drv260x_resume);
|
||||
|
||||
static const struct i2c_device_id drv260x_id[] = {
|
||||
{ "drv2605l", 0 },
|
||||
{ "drv2605l" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, drv260x_id);
|
||||
|
||||
@@ -283,7 +283,7 @@ out:
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(drv2665_pm_ops, drv2665_suspend, drv2665_resume);
|
||||
|
||||
static const struct i2c_device_id drv2665_id[] = {
|
||||
{ "drv2665", 0 },
|
||||
{ "drv2665" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, drv2665_id);
|
||||
|
||||
@@ -460,7 +460,7 @@ out:
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(drv2667_pm_ops, drv2667_suspend, drv2667_resume);
|
||||
|
||||
static const struct i2c_device_id drv2667_id[] = {
|
||||
{ "drv2667", 0 },
|
||||
{ "drv2667" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, drv2667_id);
|
||||
|
||||
@@ -531,8 +531,8 @@ static int kxtj9_resume(struct device *dev)
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(kxtj9_pm_ops, kxtj9_suspend, kxtj9_resume);
|
||||
|
||||
static const struct i2c_device_id kxtj9_id[] = {
|
||||
{ NAME, 0 },
|
||||
{ },
|
||||
{ NAME },
|
||||
{ }
|
||||
};
|
||||
|
||||
MODULE_DEVICE_TABLE(i2c, kxtj9_id);
|
||||
|
||||
@@ -186,8 +186,8 @@ static int mma8450_probe(struct i2c_client *c)
|
||||
}
|
||||
|
||||
static const struct i2c_device_id mma8450_id[] = {
|
||||
{ MMA8450_DRV_NAME, 0 },
|
||||
{ },
|
||||
{ MMA8450_DRV_NAME },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, mma8450_id);
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(pcf8574_kp_pm_ops,
|
||||
pcf8574_kp_suspend, pcf8574_kp_resume);
|
||||
|
||||
static const struct i2c_device_id pcf8574_kp_id[] = {
|
||||
{ DRV_NAME, 0 },
|
||||
{ DRV_NAME },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, pcf8574_kp_id);
|
||||
|
||||
Reference in New Issue
Block a user