diff mbox series

[v1,3/8] usb: chipidea: tegra: Remove MODULE_ALIAS

Message ID 20201215202113.30394-4-digetx@gmail.com (mailing list archive)
State Superseded
Headers show
Series Support Runtime PM and host mode by Tegra ChipIdea USB driver | expand

Commit Message

Dmitry Osipenko Dec. 15, 2020, 8:21 p.m. UTC
The module alias is provided by the OF core for the OF drivers, it
overrides the alias set by the drivers. Hence remove the unneeded macro
in order to keep the driver code cleaner.

Tested-by: Matt Merhar <mattmerhar@protonmail.com>
Tested-by: Nicolas Chauvet <kwizart@gmail.com>
Tested-by: Peter Geis <pgwipeout@gmail.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/usb/chipidea/ci_hdrc_tegra.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Thierry Reding Dec. 16, 2020, 5:58 p.m. UTC | #1
On Tue, Dec 15, 2020 at 11:21:08PM +0300, Dmitry Osipenko wrote:
> The module alias is provided by the OF core for the OF drivers, it
> overrides the alias set by the drivers. Hence remove the unneeded macro
> in order to keep the driver code cleaner.

This is slightly misleading because that manual MODULE_ALIAS is there
for legacy reasons and created that alias to bind against a platform
device created from board files back in the day.

Depending on how I interpret the commit message, it also sounds like
you're suggesting that the OF core will automatically add this alias.
However, what the OF core adds is an alias based on the OF device ID
table, which is completely different.

We don't support board files anymore and to my knowledge the aliases
generated from the OF device ID table are enough to have the driver
autoloaded, so this patch is correct. Perhaps make it clearer in the
commit message why this is no longer needed. With that:

Acked-by: Thierry Reding <treding@nvidia.com>

> Tested-by: Matt Merhar <mattmerhar@protonmail.com>
> Tested-by: Nicolas Chauvet <kwizart@gmail.com>
> Tested-by: Peter Geis <pgwipeout@gmail.com>
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  drivers/usb/chipidea/ci_hdrc_tegra.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/usb/chipidea/ci_hdrc_tegra.c b/drivers/usb/chipidea/ci_hdrc_tegra.c
> index 7455df0ede49..10eaaba2a3f0 100644
> --- a/drivers/usb/chipidea/ci_hdrc_tegra.c
> +++ b/drivers/usb/chipidea/ci_hdrc_tegra.c
> @@ -128,5 +128,4 @@ module_platform_driver(tegra_udc_driver);
>  
>  MODULE_DESCRIPTION("NVIDIA Tegra USB device mode driver");
>  MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>");
> -MODULE_ALIAS("platform:tegra-udc");
>  MODULE_LICENSE("GPL v2");
> -- 
> 2.29.2
>
Dmitry Osipenko Dec. 16, 2020, 6:06 p.m. UTC | #2
16.12.2020 20:58, Thierry Reding пишет:
> On Tue, Dec 15, 2020 at 11:21:08PM +0300, Dmitry Osipenko wrote:
>> The module alias is provided by the OF core for the OF drivers, it
>> overrides the alias set by the drivers. Hence remove the unneeded macro
>> in order to keep the driver code cleaner.
> 
> This is slightly misleading because that manual MODULE_ALIAS is there
> for legacy reasons and created that alias to bind against a platform
> device created from board files back in the day.
> 
> Depending on how I interpret the commit message, it also sounds like
> you're suggesting that the OF core will automatically add this alias.
> However, what the OF core adds is an alias based on the OF device ID
> table, which is completely different.
> 
> We don't support board files anymore and to my knowledge the aliases
> generated from the OF device ID table are enough to have the driver
> autoloaded, so this patch is correct. Perhaps make it clearer in the
> commit message why this is no longer needed. With that:
> 
> Acked-by: Thierry Reding <treding@nvidia.com>

Alright, thanks.
diff mbox series

Patch

diff --git a/drivers/usb/chipidea/ci_hdrc_tegra.c b/drivers/usb/chipidea/ci_hdrc_tegra.c
index 7455df0ede49..10eaaba2a3f0 100644
--- a/drivers/usb/chipidea/ci_hdrc_tegra.c
+++ b/drivers/usb/chipidea/ci_hdrc_tegra.c
@@ -128,5 +128,4 @@  module_platform_driver(tegra_udc_driver);
 
 MODULE_DESCRIPTION("NVIDIA Tegra USB device mode driver");
 MODULE_AUTHOR("Thierry Reding <treding@nvidia.com>");
-MODULE_ALIAS("platform:tegra-udc");
 MODULE_LICENSE("GPL v2");