Skip to contentSkip to conversation

ASoC: Intel: fix missing .owner fields

PATCH In review Pierre-Louis Bossart 2 participants 9 messages Jun 25, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover ASoC: Intel: fix missing .owner fields

Fix omission of .owner = THIS_MODULE in Intel and SOF cards. Thanks to Jaroslav and Takashi for reporting and suggesting a fix.

Pierre-Louis Bossart (4):
ASoC: SOF: nocodec: add missing .owner field
ASoC: Intel: cml_rt1011_rt5682: add missing .owner field
ASoC: Intel: sof_sdw: add missing .owner field
ASoC: Intel: bxt_rt298: add missing .owner field

 sound/soc/intel/boards/bxt_rt298.c         | 2 ++
 sound/soc/intel/boards/cml_rt1011_rt5682.c | 1 +
 sound/soc/intel/boards/sof_sdw.c           | 2 +-
 sound/soc/sof/nocodec.c                    | 1 +
 4 files changed, 5 insertions(+), 1 deletion(-)

base-commit: 6f81e520b2906258a063f09b8d1dd9d0cc6a3172

Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/4 ASoC: SOF: nocodec: add missing .owner field

This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as

cat /proc/asound/modules
0 (efault)

Fixes 8017b8fd37bf ('ASoC: SOF: Add Nocodec machine driver support')
---
 sound/soc/sof/nocodec.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/sof/nocodec.c +1 -0
index d03b5be31255..9e922df6a710 100644
@@ -14,6 +14,7 @@
 
 static struct snd_soc_card sof_nocodec_card = {
 	.name = "nocodec", /* the sof- prefix is added by the core */
+	.owner = THIS_MODULE
 };
 
 static int sof_nocodec_bes_setup(struct device *dev,
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/4 ASoC: Intel: cml_rt1011_rt5682: add missing .owner field

In reply to Pierre-Louis Bossart

This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as

cat /proc/asound/modules
0 (efault)

Fixes 17fe95d6df93 ('ASoC: Intel: boards: Add CML m/c using RT1011 and RT5682')
---
 sound/soc/intel/boards/cml_rt1011_rt5682.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/intel/boards/cml_rt1011_rt5682.c +1 -0
index 189c908c4aa8..6e8934f348ef 100644
@@ -501,6 +501,7 @@ static struct snd_soc_codec_conf rt1011_conf[] = {
 /* Cometlake audio machine driver for RT1011 and RT5682 */
 static struct snd_soc_card snd_soc_card_cml = {
 	.name = "cml_rt1011_rt5682",
+	.owner = THIS_MODULE,
 	.dai_link = cml_rt1011_rt5682_dailink,
 	.num_links = ARRAY_SIZE(cml_rt1011_rt5682_dailink),
 	.codec_conf = rt1011_conf,
Signature · 1 line
2.20.1
#3 lore raw

PATCH 3/4 ASoC: Intel: sof_sdw: add missing .owner field

In reply to Pierre-Louis Bossart

This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as

cat /proc/asound/modules
0 (efault)

Fixes 52db12d193d4 ('ASoC: Intel: boards: add sof_sdw machine driver')
---
 sound/soc/intel/boards/sof_sdw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/boards/sof_sdw.c +1 -1
index e1c1a8ba78e6..d26b82526163 100644
@@ -893,7 +893,7 @@ static const char sdw_card_long_name[] = "Intel Soundwire SOF";
 
 static struct snd_soc_card card_sof_sdw = {
 	.name = "soundwire",
-	.late_probe = sof_sdw_hdmi_card_late_probe,
+	.owner = THIS_MODULE,
 	.codec_conf = codec_conf,
 	.num_configs = ARRAY_SIZE(codec_conf),
 };
Signature · 1 line
2.20.1
maintainer
#4 lore raw

Re: [PATCH 3/4] ASoC: Intel: sof_sdw: add missing .owner field

Quoted 20 lines · Pierre-Louis Bossart

This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as

cat /proc/asound/modules
0 (efault)

Fixes 52db12d193d4 ('ASoC: Intel: boards: add sof_sdw machine driver')
---
  sound/soc/intel/boards/sof_sdw.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/boards/sof_sdw.c +0 -0
index e1c1a8ba78e6..d26b82526163 100644

sound/soc/intel/boards/sof_sdw.c static const char sdw_card_long_name[] = "Intel Soundwire SOF"; · line 896

Quoted 4 lines
sound/soc/intel/boards/sof_sdw.c +0 -1
@@ -893,7 +893,7 @@ static const char sdw_card_long_name[] = "Intel Soundwire SOF";
 
  static struct snd_soc_card card_sof_sdw = {
  	.name = "soundwire",
-	.late_probe = sof_sdw_hdmi_card_late_probe,

Deletion of .late_probe looks off in this patch. Typo?

Quoted 5 lines
sound/soc/intel/boards/sof_sdw.c +1 -0
+	.owner = THIS_MODULE,
  	.codec_conf = codec_conf,
  	.num_configs = ARRAY_SIZE(codec_conf),
  };
#5 lore raw

Re: [PATCH 3/4] ASoC: Intel: sof_sdw: add missing .owner field

Quoted 16 lines · Cezary Rojewski
Quoted 15 lines · Pierre-Louis Bossart

This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as

cat /proc/asound/modules
  0 (efault)

Fixes 52db12d193d4 ('ASoC: Intel: boards: add sof_sdw machine driver')

---
  sound/soc/intel/boards/sof_sdw.c | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 11 lines

sound/soc/intel/boards/sof_sdw.c static const char sdw_card_long_name[] = "Intel · line 896

Quoted 9 lines
sound/soc/intel/boards/sof_sdw.c +0 -1
index e1c1a8ba78e6..d26b82526163 100644
@@ -893,7 +893,7 @@ static const char sdw_card_long_name[] = "Intel 
 Soundwire SOF";
   static struct snd_soc_card card_sof_sdw = {
       .name = "soundwire",
-    .late_probe = sof_sdw_hdmi_card_late_probe,

Deletion of .late_probe looks off in this patch. Typo?

Thanks for spotting this, will send a fix. I did fix that conflict, I must have screw something up at a later stage.

Quoted 5 lines
Quoted 5 lines
sound/soc/intel/boards/sof_sdw.c +1 -0
+    .owner = THIS_MODULE,
       .codec_conf = codec_conf,
       .num_configs = ARRAY_SIZE(codec_conf),
   };
#6 lore raw

PATCH 4/4 ASoC: Intel: bxt_rt298: add missing .owner field

In reply to Pierre-Louis Bossart

This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as

cat /proc/asound/modules
0 (efault)

Fixes 76016322ec56 ('ASoC: Intel: Add Broxton-P machine driver')
---
 sound/soc/intel/boards/bxt_rt298.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/intel/boards/bxt_rt298.c +2 -0
index 7a4decf34191..c84c60df17db 100644
@@ -565,6 +565,7 @@ static int bxt_card_late_probe(struct snd_soc_card *card)
 /* broxton audio machine driver for SPT + RT298S */
 static struct snd_soc_card broxton_rt298 = {
 	.name = "broxton-rt298",
+	.owner = THIS_MODULE,
 	.dai_link = broxton_rt298_dais,
 	.num_links = ARRAY_SIZE(broxton_rt298_dais),
 	.controls = broxton_controls,
@@ -580,6 +581,7 @@ static struct snd_soc_card broxton_rt298 = {
 
 static struct snd_soc_card geminilake_rt298 = {
 	.name = "geminilake-rt298",
+	.owner = THIS_MODULE,
 	.dai_link = broxton_rt298_dais,
 	.num_links = ARRAY_SIZE(broxton_rt298_dais),
 	.controls = broxton_controls,
Signature · 1 line
2.20.1
maintainer Acked-by on the v1 series
#7 lore raw
In reply to Pierre-Louis Bossart
Quoted 9 lines · Pierre-Louis Bossart

Fix omission of .owner = THIS_MODULE in Intel and SOF cards. Thanks to Jaroslav and Takashi for reporting and suggesting a fix.

Pierre-Louis Bossart (4):
ASoC: SOF: nocodec: add missing .owner field
ASoC: Intel: cml_rt1011_rt5682: add missing .owner field
ASoC: Intel: sof_sdw: add missing .owner field
ASoC: Intel: bxt_rt298: add missing .owner field

Quoted 9 lines
  sound/soc/intel/boards/bxt_rt298.c         | 2 ++
  sound/soc/intel/boards/cml_rt1011_rt5682.c | 1 +
  sound/soc/intel/boards/sof_sdw.c           | 2 +-
  sound/soc/sof/nocodec.c                    | 1 +
  4 files changed, 5 insertions(+), 1 deletion(-)

base-commit: 6f81e520b2906258a063f09b8d1dd9d0cc6a3172

Apart for small question in 3/4 patch, looks good. Thanks Pierre!

#8 lore raw
In reply to Pierre-Louis Bossart
Quoted 2 lines · Pierre-Louis Bossart

Fix omission of .owner = THIS_MODULE in Intel and SOF cards. Thanks to Jaroslav and Takashi for reporting and suggesting a fix.

Sorry for the noise, please discard this series. I will add this in a separate machine driver update to avoid conflicts.

Quoted 16 lines

Pierre-Louis Bossart (4):
ASoC: SOF: nocodec: add missing .owner field
ASoC: Intel: cml_rt1011_rt5682: add missing .owner field
ASoC: Intel: sof_sdw: add missing .owner field
ASoC: Intel: bxt_rt298: add missing .owner field

  sound/soc/intel/boards/bxt_rt298.c         | 2 ++
  sound/soc/intel/boards/cml_rt1011_rt5682.c | 1 +
  sound/soc/intel/boards/sof_sdw.c           | 2 +-
  sound/soc/sof/nocodec.c                    | 1 +
  4 files changed, 5 insertions(+), 1 deletion(-)

base-commit: 6f81e520b2906258a063f09b8d1dd9d0cc6a3172