diff mbox series

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

Message ID 20200625180635.3563-4-pierre-louis.bossart@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series ASoC: Intel: fix missing .owner fields | expand

Commit Message

Pierre-Louis Bossart June 25, 2020, 6:06 p.m. UTC
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)

Reported-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Takashi Iwai <tiwai@suse.de>
Fixes: 52db12d193d4 ('ASoC: Intel: boards: add sof_sdw machine driver')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
---
 sound/soc/intel/boards/sof_sdw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Cezary Rojewski June 25, 2020, 6:24 p.m. UTC | #1
On 2020-06-25 8:06 PM, Pierre-Louis Bossart wrote:
> 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)
> 
> Reported-by: Jaroslav Kysela <perex@perex.cz>
> Suggested-by: Takashi Iwai <tiwai@suse.de>
> Fixes: 52db12d193d4 ('ASoC: Intel: boards: add sof_sdw machine driver')
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
> ---
>   sound/soc/intel/boards/sof_sdw.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
> index e1c1a8ba78e6..d26b82526163 100644
> --- a/sound/soc/intel/boards/sof_sdw.c
> +++ b/sound/soc/intel/boards/sof_sdw.c
> @@ -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?

> +	.owner = THIS_MODULE,
>   	.codec_conf = codec_conf,
>   	.num_configs = ARRAY_SIZE(codec_conf),
>   };
>
Pierre-Louis Bossart June 25, 2020, 6:34 p.m. UTC | #2
On 6/25/20 1:24 PM, Cezary Rojewski wrote:
> On 2020-06-25 8:06 PM, Pierre-Louis Bossart wrote:
>> 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)
>>
>> Reported-by: Jaroslav Kysela <perex@perex.cz>
>> Suggested-by: Takashi Iwai <tiwai@suse.de>
>> Fixes: 52db12d193d4 ('ASoC: Intel: boards: add sof_sdw machine driver')
>> Signed-off-by: Pierre-Louis Bossart 
>> <pierre-louis.bossart@linux.intel.com>
>> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
>> ---
>>   sound/soc/intel/boards/sof_sdw.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/sound/soc/intel/boards/sof_sdw.c 
>> b/sound/soc/intel/boards/sof_sdw.c
>> index e1c1a8ba78e6..d26b82526163 100644
>> --- a/sound/soc/intel/boards/sof_sdw.c
>> +++ b/sound/soc/intel/boards/sof_sdw.c
>> @@ -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.

>> +    .owner = THIS_MODULE,
>>       .codec_conf = codec_conf,
>>       .num_configs = ARRAY_SIZE(codec_conf),
>>   };
>>
diff mbox series

Patch

diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c
index e1c1a8ba78e6..d26b82526163 100644
--- a/sound/soc/intel/boards/sof_sdw.c
+++ b/sound/soc/intel/boards/sof_sdw.c
@@ -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),
 };