Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1501140

[PATCH] clk: samsung: clk-exynos-audss: Fix module autoload

From Javier Martinez Canillas <javier@osg.samsung.com>
Newsgroups linux.kernel
Subject [PATCH] clk: samsung: clk-exynos-audss: Fix module autoload
Date 2016-10-14 20:50 +0200
Message-ID <ssfIm-53c-21@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.

Export the module alias information using the MODULE_DEVICE_TABLE() macro.

Before this patch:

$ modinfo drivers/clk/samsung/clk-exynos-audss.ko | grep alias
alias:          platform:exynos-audss-clk

After this patch:

$ modinfo drivers/clk/samsung/clk-exynos-audss.ko | grep alias
alias:          platform:exynos-audss-clk
alias:          of:N*T*Csamsung,exynos5420-audss-clockC*
alias:          of:N*T*Csamsung,exynos5420-audss-clock
alias:          of:N*T*Csamsung,exynos5410-audss-clockC*
alias:          of:N*T*Csamsung,exynos5410-audss-clock
alias:          of:N*T*Csamsung,exynos5250-audss-clockC*
alias:          of:N*T*Csamsung,exynos5250-audss-clock
alias:          of:N*T*Csamsung,exynos4210-audss-clockC*
alias:          of:N*T*Csamsung,exynos4210-audss-clock

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

 drivers/clk/samsung/clk-exynos-audss.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c
index 51d152f735cc..17e68a724945 100644
--- a/drivers/clk/samsung/clk-exynos-audss.c
+++ b/drivers/clk/samsung/clk-exynos-audss.c
@@ -106,6 +106,7 @@ static const struct of_device_id exynos_audss_clk_of_match[] = {
 	},
 	{ },
 };
+MODULE_DEVICE_TABLE(of, exynos_audss_clk_of_match);
 
 static void exynos_audss_clk_teardown(void)
 {
-- 
2.7.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] clk: samsung: clk-exynos-audss: Fix module autoload Javier Martinez Canillas <javier@osg.samsung.com> - 2016-10-14 20:50 +0200
  Re: [PATCH] clk: samsung: clk-exynos-audss: Fix module autoload Krzysztof Kozlowski <krzk@kernel.org> - 2016-10-15 19:30 +0200
    Re: [PATCH] clk: samsung: clk-exynos-audss: Fix module autoload Javier Martinez Canillas <javier@osg.samsung.com> - 2016-10-16 15:50 +0200

csiph-web