]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ASoC: SOF: nocodec: add missing .owner field
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Thu, 25 Jun 2020 19:12:52 +0000 (14:12 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Aug 2020 06:16:08 +0000 (08:16 +0200)
[ Upstream commit 8753889e2720c1ef7ebf03370e384f5bf5ff4fab ]

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')
Reported-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20200625191308.3322-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/sof/nocodec.c

index ea0fe9a09f3f5a44d19a93df42fdd4458cfbd24c..71410116add1a37762599044eb4f14365a9fc826 100644 (file)
@@ -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,