2018-03-26 10:07:09

by Sean Wang

[permalink] [raw]
Subject: [PATCH] rtc: mt7622: fix module autoloading for OF platform drivers

From: Sean Wang <[email protected]>

It's required to create a modules.alias via MODULE_DEVICE_TABLE helper
for the OF platform driver. Otherwise, module autoloading cannot work.

Signed-off-by: Sean Wang <[email protected]>
---
drivers/rtc/rtc-mt7622.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/rtc/rtc-mt7622.c b/drivers/rtc/rtc-mt7622.c
index d79b9ae..147252f 100644
--- a/drivers/rtc/rtc-mt7622.c
+++ b/drivers/rtc/rtc-mt7622.c
@@ -307,6 +307,7 @@ static const struct of_device_id mtk_rtc_match[] = {
{ .compatible = "mediatek,soc-rtc" },
{},
};
+MODULE_DEVICE_TABLE(of, mtk_rtc_match);

static int mtk_rtc_probe(struct platform_device *pdev)
{
--
2.7.4



2018-04-03 15:00:02

by Alexandre Belloni

[permalink] [raw]
Subject: Re: [PATCH] rtc: mt7622: fix module autoloading for OF platform drivers

On 26/03/2018 18:05:52+0800, [email protected] wrote:
> From: Sean Wang <[email protected]>
>
> It's required to create a modules.alias via MODULE_DEVICE_TABLE helper
> for the OF platform driver. Otherwise, module autoloading cannot work.
>
> Signed-off-by: Sean Wang <[email protected]>
> ---
> drivers/rtc/rtc-mt7622.c | 1 +
> 1 file changed, 1 insertion(+)
>
Applied, thanks.

--
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com