diff mbox series

[-next] usb: bdc: fix module autoloading

Message ID 20240814030443.3876203-1-liaochen4@huawei.com (mailing list archive)
State Accepted
Commit 8557ef3f24e48d00c09d85ef9241fb43f4fdfb0e
Headers show
Series [-next] usb: bdc: fix module autoloading | expand

Commit Message

Liao Chen Aug. 14, 2024, 3:04 a.m. UTC
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
based on the alias from of_device_id table.

Signed-off-by: Liao Chen <liaochen4@huawei.com>
---
 drivers/usb/gadget/udc/bdc/bdc_core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Greg Kroah-Hartman Aug. 14, 2024, 4:36 a.m. UTC | #1
On Wed, Aug 14, 2024 at 03:04:43AM +0000, Liao Chen wrote:
> Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
> based on the alias from of_device_id table.
> 
> Signed-off-by: Liao Chen <liaochen4@huawei.com>
> ---
>  drivers/usb/gadget/udc/bdc/bdc_core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c
> index 35a652807fca..5149e2b7f050 100644
> --- a/drivers/usb/gadget/udc/bdc/bdc_core.c
> +++ b/drivers/usb/gadget/udc/bdc/bdc_core.c
> @@ -639,6 +639,7 @@ static const struct of_device_id bdc_of_match[] = {
>  	{ .compatible = "brcm,bdc" },
>  	{ /* sentinel */ }
>  };
> +MODULE_DEVICE_TABLE(of, bdc_of_match);
>  
>  static struct platform_driver bdc_driver = {
>  	.driver		= {
> -- 
> 2.34.1
> 
> 

What commit id does this fix?
Liao Chen Aug. 15, 2024, 1:27 a.m. UTC | #2
On 2024/8/14 12:36, Greg KH wrote:
> On Wed, Aug 14, 2024 at 03:04:43AM +0000, Liao Chen wrote:
>> Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
>> based on the alias from of_device_id table.
>>
>> Signed-off-by: Liao Chen <liaochen4@huawei.com>
>> ---
>>   drivers/usb/gadget/udc/bdc/bdc_core.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c
>> index 35a652807fca..5149e2b7f050 100644
>> --- a/drivers/usb/gadget/udc/bdc/bdc_core.c
>> +++ b/drivers/usb/gadget/udc/bdc/bdc_core.c
>> @@ -639,6 +639,7 @@ static const struct of_device_id bdc_of_match[] = {
>>   	{ .compatible = "brcm,bdc" },
>>   	{ /* sentinel */ }
>>   };
>> +MODULE_DEVICE_TABLE(of, bdc_of_match);
>>   
>>   static struct platform_driver bdc_driver = {
>>   	.driver		= {
>> -- 
>> 2.34.1
>>
>>
> 
> What commit id does this fix?
Hi, this patch fixes commit 8ac1685bf911f70aea6de67b3db5674c3ea112f1 
("usb: bdc: hook a quick Device Tree compatible string"), which allows 
bdc device probing.

Thanks,
Chen
Florian Fainelli Aug. 15, 2024, 4:25 a.m. UTC | #3
On 8/13/2024 8:04 PM, 'Liao Chen' via BCM-KERNEL-FEEDBACK-LIST,PDL wrote:
> Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
> based on the alias from of_device_id table.
> 
> Signed-off-by: Liao Chen <liaochen4@huawei.com>

Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>


Thanks!
diff mbox series

Patch

diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c
index 35a652807fca..5149e2b7f050 100644
--- a/drivers/usb/gadget/udc/bdc/bdc_core.c
+++ b/drivers/usb/gadget/udc/bdc/bdc_core.c
@@ -639,6 +639,7 @@  static const struct of_device_id bdc_of_match[] = {
 	{ .compatible = "brcm,bdc" },
 	{ /* sentinel */ }
 };
+MODULE_DEVICE_TABLE(of, bdc_of_match);
 
 static struct platform_driver bdc_driver = {
 	.driver		= {