Commit 61e05bad authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Andi Shyti
Browse files

i2c: designware: Replace MODULE_ALIAS() with MODULE_DEVICE_TABLE()



As Krzysztof Kozlowski pointed out the better is to use
MODULE_DEVICE_TABLE() as it will be consistent with the content
of the real ID table of the platform devices.

While at it, drop unneeded and unused module alias in PCI glue
driver as PCI already has its own ID table and automatic loading
should just work.

Reviewed-by: default avatarAndi Shyti <andi.shyti@kernel.org>
Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Acked-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: default avatarSerge Semin <fancer.lancer@gmail.com>
Link: https://lore.kernel.org/r/20231120144641.1660574-9-andriy.shevchenko@linux.intel.com


Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarAndi Shyti <andi.shyti@kernel.org>
parent 1ce1ad6d
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -424,8 +424,6 @@ static struct pci_driver dw_i2c_driver = {
};
module_pci_driver(dw_i2c_driver);

/* Work with hotplug and coldplug */
MODULE_ALIAS("i2c_designware-pci");
MODULE_AUTHOR("Baruch Siach <baruch@tkos.co.il>");
MODULE_DESCRIPTION("Synopsys DesignWare PCI I2C bus adapter");
MODULE_LICENSE("GPL");
+6 −2
Original line number Diff line number Diff line
@@ -480,8 +480,11 @@ static const struct dev_pm_ops dw_i2c_dev_pm_ops = {
	RUNTIME_PM_OPS(dw_i2c_plat_runtime_suspend, dw_i2c_plat_runtime_resume, NULL)
};

/* Work with hotplug and coldplug */
MODULE_ALIAS("platform:i2c_designware");
static const struct platform_device_id dw_i2c_platform_ids[] = {
	{ "i2c_designware" },
	{}
};
MODULE_DEVICE_TABLE(platform, dw_i2c_platform_ids);

static struct platform_driver dw_i2c_driver = {
	.probe = dw_i2c_plat_probe,
@@ -492,6 +495,7 @@ static struct platform_driver dw_i2c_driver = {
		.acpi_match_table = ACPI_PTR(dw_i2c_acpi_match),
		.pm	= pm_ptr(&dw_i2c_dev_pm_ops),
	},
	.id_table = dw_i2c_platform_ids,
};

static int __init dw_i2c_init_driver(void)