All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: codecs: msm8916-wcd-analog: fix module autoload
@ 2017-10-03  9:49 Nicolas Dechesne
  2017-10-03 20:43   ` Srinivas Kandagatla
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Dechesne @ 2017-10-03  9:49 UTC (permalink / raw)
  To: Mark Brown, alsa-devel
  Cc: linux-kernel, Jaroslav Kysela, Takashi Iwai, srinivas.kandagatla,
	Nicolas Dechesne

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 snd_soc_msm8916_analog | grep alias
$

After this patch:

$ modinfo snd_soc_msm8916_analog | grep alias
alias:          of:N*T*Cqcom,pm8916-wcd-analog-codecC*
alias:          of:N*T*Cqcom,pm8916-wcd-analog-codec

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
---
 sound/soc/codecs/msm8916-wcd-analog.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c
index 549c269acc7d..d79e5b35e003 100644
--- a/sound/soc/codecs/msm8916-wcd-analog.c
+++ b/sound/soc/codecs/msm8916-wcd-analog.c
@@ -1241,6 +1241,8 @@ static const struct of_device_id pm8916_wcd_analog_spmi_match_table[] = {
 	{ }
 };
 
+MODULE_DEVICE_TABLE(of, pm8916_wcd_analog_spmi_match_table);
+
 static struct platform_driver pm8916_wcd_analog_spmi_driver = {
 	.driver = {
 		   .name = "qcom,pm8916-wcd-spmi-codec",
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: codecs: msm8916-wcd-analog: fix module autoload
  2017-10-03  9:49 [PATCH] ASoC: codecs: msm8916-wcd-analog: fix module autoload Nicolas Dechesne
@ 2017-10-03 20:43   ` Srinivas Kandagatla
  0 siblings, 0 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2017-10-03 20:43 UTC (permalink / raw)
  To: Nicolas Dechesne, Mark Brown, alsa-devel
  Cc: linux-kernel, Jaroslav Kysela, Takashi Iwai



On 03/10/17 10:49, Nicolas Dechesne 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 snd_soc_msm8916_analog | grep alias
> $
> 
> After this patch:
> 
> $ modinfo snd_soc_msm8916_analog | grep alias
> alias:          of:N*T*Cqcom,pm8916-wcd-analog-codecC*
> alias:          of:N*T*Cqcom,pm8916-wcd-analog-codec
> 
> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>

Thanks for the patch

Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

> ---
>   sound/soc/codecs/msm8916-wcd-analog.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c
> index 549c269acc7d..d79e5b35e003 100644
> --- a/sound/soc/codecs/msm8916-wcd-analog.c
> +++ b/sound/soc/codecs/msm8916-wcd-analog.c
> @@ -1241,6 +1241,8 @@ static const struct of_device_id pm8916_wcd_analog_spmi_match_table[] = {
>   	{ }
>   };
>   
> +MODULE_DEVICE_TABLE(of, pm8916_wcd_analog_spmi_match_table);
> +
>   static struct platform_driver pm8916_wcd_analog_spmi_driver = {
>   	.driver = {
>   		   .name = "qcom,pm8916-wcd-spmi-codec",
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: codecs: msm8916-wcd-analog: fix module autoload
@ 2017-10-03 20:43   ` Srinivas Kandagatla
  0 siblings, 0 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2017-10-03 20:43 UTC (permalink / raw)
  To: Nicolas Dechesne, Mark Brown, alsa-devel; +Cc: Takashi Iwai, linux-kernel



On 03/10/17 10:49, Nicolas Dechesne 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 snd_soc_msm8916_analog | grep alias
> $
> 
> After this patch:
> 
> $ modinfo snd_soc_msm8916_analog | grep alias
> alias:          of:N*T*Cqcom,pm8916-wcd-analog-codecC*
> alias:          of:N*T*Cqcom,pm8916-wcd-analog-codec
> 
> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>

Thanks for the patch

Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

> ---
>   sound/soc/codecs/msm8916-wcd-analog.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c
> index 549c269acc7d..d79e5b35e003 100644
> --- a/sound/soc/codecs/msm8916-wcd-analog.c
> +++ b/sound/soc/codecs/msm8916-wcd-analog.c
> @@ -1241,6 +1241,8 @@ static const struct of_device_id pm8916_wcd_analog_spmi_match_table[] = {
>   	{ }
>   };
>   
> +MODULE_DEVICE_TABLE(of, pm8916_wcd_analog_spmi_match_table);
> +
>   static struct platform_driver pm8916_wcd_analog_spmi_driver = {
>   	.driver = {
>   		   .name = "qcom,pm8916-wcd-spmi-codec",
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-03 20:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-03  9:49 [PATCH] ASoC: codecs: msm8916-wcd-analog: fix module autoload Nicolas Dechesne
2017-10-03 20:43 ` Srinivas Kandagatla
2017-10-03 20:43   ` Srinivas Kandagatla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.