[alsa-devel] [PATCH v2] ASoC: au1x: Add .owner to struct snd_soc_card

Axel Lin axel.lin at gmail.com
Fri Dec 23 02:53:55 CET 2011


Add missing .owner of struct snd_soc_card. This prevents the module from being
removed from underneath its users.

Reported-by: Lothar Waßmann <LW at KARO-electronics.de>
Signed-off-by: Axel Lin <axel.lin at gmail.com>
---
v2: regenerate the patch against asoc tree.

 sound/soc/au1x/db1000.c |    1 +
 sound/soc/au1x/db1200.c |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/sound/soc/au1x/db1000.c b/sound/soc/au1x/db1000.c
index 127477a..8387d42 100644
--- a/sound/soc/au1x/db1000.c
+++ b/sound/soc/au1x/db1000.c
@@ -29,6 +29,7 @@ static struct snd_soc_dai_link db1000_ac97_dai = {
 
 static struct snd_soc_card db1000_ac97 = {
 	.name		= "DB1000_AC97",
+	.owner		= THIS_MODULE,
 	.dai_link	= &db1000_ac97_dai,
 	.num_links	= 1,
 };
diff --git a/sound/soc/au1x/db1200.c b/sound/soc/au1x/db1200.c
index 289312c..15e5138 100644
--- a/sound/soc/au1x/db1200.c
+++ b/sound/soc/au1x/db1200.c
@@ -45,6 +45,7 @@ static struct snd_soc_dai_link db1200_ac97_dai = {
 
 static struct snd_soc_card db1200_ac97_machine = {
 	.name		= "DB1200_AC97",
+	.owner		= THIS_MODULE,
 	.dai_link	= &db1200_ac97_dai,
 	.num_links	= 1,
 };
@@ -94,6 +95,7 @@ static struct snd_soc_dai_link db1200_i2s_dai = {
 
 static struct snd_soc_card db1200_i2s_machine = {
 	.name		= "DB1200_I2S",
+	.owner		= THIS_MODULE,
 	.dai_link	= &db1200_i2s_dai,
 	.num_links	= 1,
 };
-- 
1.7.5.4





More information about the Alsa-devel mailing list