Missed .owner of struct snd_soc_card will prevent the module from being removed from underneath its users.
Reported-by: Lothar Waßmann LW@KARO-electronics.de Signed-off-by: Axel Lin axel.lin@gmail.com --- sound/soc/au1x/db1000.c | 1 + sound/soc/au1x/db1200.c | 6 ++++++ 2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/sound/soc/au1x/db1000.c b/sound/soc/au1x/db1000.c index 094a207..511d83c 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 ec725f6..c8620b7 100644 --- a/sound/soc/au1x/db1200.c +++ b/sound/soc/au1x/db1200.c @@ -57,6 +57,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, }; @@ -72,12 +73,14 @@ static struct snd_soc_dai_link db1300_ac97_dai = {
static struct snd_soc_card db1300_ac97_machine = { .name = "DB1300_AC97", + .owner = THIS_MODULE, .dai_link = &db1300_ac97_dai, .num_links = 1, };
static struct snd_soc_card db1550_ac97_machine = { .name = "DB1550_AC97", + .owner = THIS_MODULE, .dai_link = &db1200_ac97_dai, .num_links = 1, }; @@ -127,6 +130,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, }; @@ -143,6 +147,7 @@ static struct snd_soc_dai_link db1300_i2s_dai = {
static struct snd_soc_card db1300_i2s_machine = { .name = "DB1300_I2S", + .owner = THIS_MODULE, .dai_link = &db1300_i2s_dai, .num_links = 1, }; @@ -159,6 +164,7 @@ static struct snd_soc_dai_link db1550_i2s_dai = {
static struct snd_soc_card db1550_i2s_machine = { .name = "DB1550_I2S", + .owner = THIS_MODULE, .dai_link = &db1550_i2s_dai, .num_links = 1, };