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


Groups > linux.kernel > #1501140 > unrolled thread

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

Started byJavier Martinez Canillas <javier@osg.samsung.com>
First post2016-10-14 20:50 +0200
Last post2016-10-16 15:50 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [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

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

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2016-10-14 20:50 +0200
Subject[PATCH] clk: samsung: clk-exynos-audss: Fix module autoload
Message-ID<ssfIm-53c-21@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1501333

FromKrzysztof Kozlowski <krzk@kernel.org>
Date2016-10-15 19:30 +0200
Message-ID<ssAWv-2eM-63@gated-at.bofh.it>
In reply to#1501140
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

[toc] | [prev] | [next] | [standalone]


#1501453

FromJavier Martinez Canillas <javier@osg.samsung.com>
Date2016-10-16 15:50 +0200
Message-ID<ssTZ7-6u4-1@gated-at.bofh.it>
In reply to#1501333
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web