From: Sean Wang Date: Mon, 26 Mar 2018 10:05:52 +0000 (+0800) Subject: rtc: mt7622: fix module autoloading for OF platform drivers X-Git-Tag: v4.17-rc1~62^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3fc990a5dbfff26fe2ef1286d9268d55a3136206;p=thirdparty%2Fkernel%2Flinux.git rtc: mt7622: fix module autoloading for OF platform drivers 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 Signed-off-by: Alexandre Belloni --- diff --git a/drivers/rtc/rtc-mt7622.c b/drivers/rtc/rtc-mt7622.c index da213278f343d..fd0cea722286b 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) {