mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-18 08:35:08 +08:00
i2c: 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 a comma after the sentinel entry. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
This commit is contained in:
parent
256ed3108b
commit
d08ed10623
@ -1066,8 +1066,8 @@ EXPORT_SYMBOL(i2c_find_device_by_fwnode);
|
||||
|
||||
|
||||
static const struct i2c_device_id dummy_id[] = {
|
||||
{ "dummy", 0 },
|
||||
{ },
|
||||
{ "dummy" },
|
||||
{ }
|
||||
};
|
||||
|
||||
static int dummy_probe(struct i2c_client *client)
|
||||
|
@ -162,7 +162,7 @@ static void i2c_slave_testunit_remove(struct i2c_client *client)
|
||||
}
|
||||
|
||||
static const struct i2c_device_id i2c_slave_testunit_id[] = {
|
||||
{ "slave-testunit", 0 },
|
||||
{ "slave-testunit" },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, i2c_slave_testunit_id);
|
||||
|
@ -160,7 +160,7 @@ static void smbalert_remove(struct i2c_client *ara)
|
||||
}
|
||||
|
||||
static const struct i2c_device_id smbalert_ids[] = {
|
||||
{ "smbus_alert", 0 },
|
||||
{ "smbus_alert" },
|
||||
{ /* LIST END */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(i2c, smbalert_ids);
|
||||
|
@ -78,7 +78,7 @@ struct pca9541 {
|
||||
};
|
||||
|
||||
static const struct i2c_device_id pca9541_id[] = {
|
||||
{"pca9541", 0},
|
||||
{ "pca9541" },
|
||||
{}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user