2021-06-16 03:50:53

by Yu Jiahua

[permalink] [raw]
Subject: [PATCH -next] drivers: usb: add missing MODULE_DEVICE_TABLE definition in brcmstb-usb-pinmap.c

This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Signed-off-by: Yu Jiahua <[email protected]>
---
drivers/usb/misc/brcmstb-usb-pinmap.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/usb/misc/brcmstb-usb-pinmap.c b/drivers/usb/misc/brcmstb-usb-pinmap.c
index b3cfe8666ea7..cbc958355359 100644
--- a/drivers/usb/misc/brcmstb-usb-pinmap.c
+++ b/drivers/usb/misc/brcmstb-usb-pinmap.c
@@ -331,6 +331,7 @@ static const struct of_device_id brcmstb_usb_pinmap_of_match[] = {
{ .compatible = "brcm,usb-pinmap" },
{ },
};
+MODULE_DEVICE_TABLE(of, brcmstb_usb_pinmap_of_match);

static struct platform_driver brcmstb_usb_pinmap_driver = {
.driver = {
--
2.17.1


2021-06-16 04:00:53

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH -next] drivers: usb: add missing MODULE_DEVICE_TABLE definition in brcmstb-usb-pinmap.c



On 6/15/2021 8:50 PM, Yu Jiahua wrote:
> This patch adds missing MODULE_DEVICE_TABLE definition which generates
> correct modalias for automatic loading of this driver when it is built
> as an external module.
>
> Signed-off-by: Yu Jiahua <[email protected]>

Acked-by: Florian Fainelli <[email protected]>
--
Florian

2021-06-16 06:18:43

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH -next] drivers: usb: add missing MODULE_DEVICE_TABLE definition in brcmstb-usb-pinmap.c

On Tue, Jun 15, 2021 at 07:50:03PM -0800, Yu Jiahua wrote:
> This patch adds missing MODULE_DEVICE_TABLE definition which generates
> correct modalias for automatic loading of this driver when it is built
> as an external module.
>
> Signed-off-by: Yu Jiahua <[email protected]>
> ---
> drivers/usb/misc/brcmstb-usb-pinmap.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/misc/brcmstb-usb-pinmap.c b/drivers/usb/misc/brcmstb-usb-pinmap.c
> index b3cfe8666ea7..cbc958355359 100644
> --- a/drivers/usb/misc/brcmstb-usb-pinmap.c
> +++ b/drivers/usb/misc/brcmstb-usb-pinmap.c
> @@ -331,6 +331,7 @@ static const struct of_device_id brcmstb_usb_pinmap_of_match[] = {
> { .compatible = "brcm,usb-pinmap" },
> { },
> };
> +MODULE_DEVICE_TABLE(of, brcmstb_usb_pinmap_of_match);

I have asked you all to stop sending these types of patches until you
can prove that they are actually needed.

Is this change really needed? Does the presence of a of table determine
if this module should be loaded or not?

How did you find this problem?

thanks,

greg k-h