Skip to content

Commit dcb31e8

Browse files
glneowsakernel
authored andcommitted
i2c: davinci: Use platform table macro over module_alias
Generates the same platform module alias. More standard usage. Signed-off-by: Andrew Davis <[email protected]> Reviewed-by: Bartosz Golaszewski <[email protected]> [wsa: rebased to i2c/for-mergewindow] Signed-off-by: Wolfram Sang <[email protected]>
1 parent 9e1a1ee commit dcb31e8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/i2c/busses/i2c-davinci.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -935,12 +935,16 @@ static const struct dev_pm_ops davinci_i2c_pm = {
935935
#define davinci_i2c_pm_ops NULL
936936
#endif
937937

938-
/* work with hotplug and coldplug */
939-
MODULE_ALIAS("platform:i2c_davinci");
938+
static const struct platform_device_id davinci_i2c_driver_ids[] = {
939+
{ .name = "i2c_davinci", },
940+
{ /* sentinel */ }
941+
};
942+
MODULE_DEVICE_TABLE(platform, davinci_i2c_driver_ids);
940943

941944
static struct platform_driver davinci_i2c_driver = {
942945
.probe = davinci_i2c_probe,
943946
.remove_new = davinci_i2c_remove,
947+
.id_table = davinci_i2c_driver_ids,
944948
.driver = {
945949
.name = "i2c_davinci",
946950
.pm = davinci_i2c_pm_ops,

0 commit comments

Comments
 (0)