The previously applied similar commit
553e26a45e0e ("gpio: Initialize
i2c_device_id arrays using member names") only handled i2c_device_id
arrays that also have an assignment for .driver_data.
For consistency also convert the entries without such an assignment.
Again this is a modification that has no influence on the generated
code, it's only more robust against changes to struct i2c_device_id and
easier to understand for a human.
While touching adnp_i2c_id[] drop the comma after the list terminator.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20260520074812.1632512-2-u.kleine-koenig@baylibre.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
}
static const struct i2c_device_id adnp_i2c_id[] = {
- { "gpio-adnp" },
- { },
+ { .name = "gpio-adnp" },
+ { }
};
MODULE_DEVICE_TABLE(i2c, adnp_i2c_id);
MODULE_DEVICE_TABLE(of, ds4520_gpio_of_match_table);
static const struct i2c_device_id ds4520_gpio_id_table[] = {
- { "ds4520-gpio" },
+ { .name = "ds4520-gpio" },
{ }
};
MODULE_DEVICE_TABLE(i2c, ds4520_gpio_id_table);
MODULE_DEVICE_TABLE(of, fxl6408_dt_ids);
static const struct i2c_device_id fxl6408_id[] = {
- { "fxl6408" },
+ { .name = "fxl6408" },
{ }
};
MODULE_DEVICE_TABLE(i2c, fxl6408_id);
}
static const struct i2c_device_id gw_pld_id[] = {
- { "gw-pld", },
+ { .name = "gw-pld" },
{ }
};
MODULE_DEVICE_TABLE(i2c, gw_pld_id);
}
static const struct i2c_device_id max7300_id[] = {
- { "max7300" },
+ { .name = "max7300" },
{ }
};
MODULE_DEVICE_TABLE(i2c, max7300_id);
}
static const struct i2c_device_id tpic2810_id_table[] = {
- { "tpic2810", },
+ { .name = "tpic2810" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(i2c, tpic2810_id_table);
}
static const struct i2c_device_id ts4900_gpio_id_table[] = {
- { "ts4900-gpio", },
+ { .name = "ts4900-gpio" },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(i2c, ts4900_gpio_id_table);