diff mbox series

[-next] spi: bcm63xx: Fix module autoloading

Message ID 20240819040709.2801490-1-ruanjinjie@huawei.com (mailing list archive)
State Accepted
Commit 909f34f2462a99bf876f64c5c61c653213e32fce
Headers show
Series [-next] spi: bcm63xx: Fix module autoloading | expand

Commit Message

Jinjie Ruan Aug. 19, 2024, 4:07 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: Jinjie Ruan <ruanjinjie@huawei.com>
---
 drivers/spi/spi-bcm63xx.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jonas Gorski Aug. 19, 2024, 7:47 a.m. UTC | #1
Hi,

On Mon, 19 Aug 2024 at 05:59, Jinjie Ruan <ruanjinjie@huawei.com> wrote:
>
> Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
> based on the alias from of_device_id table.

Your code change adds a MODULE_DEVICE_TABLE() to platform_device_id,
not of_device_id (which is also missing it). Please align change and
message.

Also since this is a fix, please add an appropriate Fixes tag and Cc stable.

>
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>

Apart from that the change looks good.

Reviewed-by: Jonas Gorski <jonas.gorski@gmail.com>

Best Regards,
Jonas
Jinjie Ruan Aug. 19, 2024, 8:07 a.m. UTC | #2
On 2024/8/19 15:47, Jonas Gorski wrote:
> Hi,
> 
> On Mon, 19 Aug 2024 at 05:59, Jinjie Ruan <ruanjinjie@huawei.com> wrote:
>>
>> Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
>> based on the alias from of_device_id table.
> 
> Your code change adds a MODULE_DEVICE_TABLE() to platform_device_id,
> not of_device_id (which is also missing it). Please align change and
> message.
> 
> Also since this is a fix, please add an appropriate Fixes tag and Cc stable.
> 
>>
>> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> 
> Apart from that the change looks good.
> 
> Reviewed-by: Jonas Gorski <jonas.gorski@gmail.com>

Jonas, Thank you, I'll fix it, thank you!

> 
> Best Regards,
> Jonas
diff mbox series

Patch

diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index aac41bd05f98..289f8a94980b 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -466,6 +466,7 @@  static const struct platform_device_id bcm63xx_spi_dev_match[] = {
 	{
 	},
 };
+MODULE_DEVICE_TABLE(platform, bcm63xx_spi_dev_match);
 
 static const struct of_device_id bcm63xx_spi_of_match[] = {
 	{ .compatible = "brcm,bcm6348-spi", .data = &bcm6348_spi_reg_offsets },