[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c39d3c5b-6722-4cbd-a2c5-a8b642b47016@amd.com>
Date: Fri, 10 Nov 2023 13:39:12 -0600
From: Mario Limonciello <mario.limonciello@....com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Wolfram Sang <wsa@...nel.org>, linux-i2c@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Mika Westerberg <mika.westerberg@...ux.intel.com>,
Jan Dabros <jsd@...ihalf.com>,
Andi Shyti <andi.shyti@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Hans de Goede <hdegoede@...hat.com>
Subject: Re: [PATCH v3 09/25] i2c: designware: Replace MODULE_ALIAS() with
MODULE_DEVICE_TABLE()
On 11/10/2023 12:11, Andy Shevchenko wrote:
> 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: Andi Shyti <andi.shyti@...nel.org>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Reviewed-by: Mario Limonciello <mario.limonciello@....com>
> ---
> drivers/i2c/busses/i2c-designware-pcidrv.c | 2 --
> drivers/i2c/busses/i2c-designware-platdrv.c | 8 ++++++--
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
> index d2ed4e77afb3..db642e0aa61f 100644
> --- a/drivers/i2c/busses/i2c-designware-pcidrv.c
> +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
> @@ -417,8 +417,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@...s.co.il>");
> MODULE_DESCRIPTION("Synopsys DesignWare PCI I2C bus adapter");
> MODULE_LICENSE("GPL");
> diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
> index 4b5e58e1ce5b..5d8427ccc9b4 100644
> --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> @@ -486,8 +486,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,
> @@ -498,6 +501,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)
Powered by blists - more mailing lists