* [PATCH] clk: samsung: clk-exynos-audss: Fix module autoload
@ 2016-10-14 18:44 Javier Martinez Canillas
2016-10-15 17:27 ` Krzysztof Kozlowski
0 siblings, 1 reply; 3+ messages in thread
From: Javier Martinez Canillas @ 2016-10-14 18:44 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Kukjin Kim, Michael Turquette,
Stephen Boyd, Chanwoo Choi, linux-clk, linux-samsung-soc,
Sylwester Nawrocki, Tomasz Figa, Krzysztof Kozlowski,
linux-arm-kernel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: samsung: clk-exynos-audss: Fix module autoload
2016-10-14 18:44 [PATCH] clk: samsung: clk-exynos-audss: Fix module autoload Javier Martinez Canillas
@ 2016-10-15 17:27 ` Krzysztof Kozlowski
2016-10-16 13:44 ` Javier Martinez Canillas
0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2016-10-15 17:27 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Kukjin Kim, Michael Turquette, Stephen Boyd,
Chanwoo Choi, linux-clk, linux-samsung-soc, Sylwester Nawrocki,
Tomasz Figa, Krzysztof Kozlowski, linux-arm-kernel
On Fri, Oct 14, 2016 at 03:44:05PM -0300, Javier Martinez Canillas wrote:
> 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(+)
Indeed, this was missed by 4d252fd5719b thus I think it could be
mentioned as fix tag (just for reference...):
Fixes: 4d252fd5719b ("clk: samsung: Allow modular build of the Audio Subsystem CLKCON driver")
Anyway, this fixes the issue, so:
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] clk: samsung: clk-exynos-audss: Fix module autoload
2016-10-15 17:27 ` Krzysztof Kozlowski
@ 2016-10-16 13:44 ` Javier Martinez Canillas
0 siblings, 0 replies; 3+ messages in thread
From: Javier Martinez Canillas @ 2016-10-16 13:44 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: linux-kernel, Kukjin Kim, Michael Turquette, Stephen Boyd,
Chanwoo Choi, linux-clk, linux-samsung-soc, Sylwester Nawrocki,
Tomasz Figa, linux-arm-kernel
Hello Krzysztof,
On 10/15/2016 02:27 PM, Krzysztof Kozlowski wrote:
> On Fri, Oct 14, 2016 at 03:44:05PM -0300, Javier Martinez Canillas wrote:
>> 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(+)
>
> Indeed, this was missed by 4d252fd5719b thus I think it could be
> mentioned as fix tag (just for reference...):
> Fixes: 4d252fd5719b ("clk: samsung: Allow modular build of the Audio Subsystem CLKCON driver")
>
Indeed. I missed that, sorry. I'll post a v2 including this information.
> Anyway, this fixes the issue, so:
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> Tested-by: Krzysztof Kozlowski <krzk@kernel.org>
>
Thanks!
> Best regards,
> Krzysztof
>
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-16 13:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-14 18:44 [PATCH] clk: samsung: clk-exynos-audss: Fix module autoload Javier Martinez Canillas
2016-10-15 17:27 ` Krzysztof Kozlowski
2016-10-16 13:44 ` Javier Martinez Canillas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).