Commit 4c3c5df0 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

ASoC: fsl: Add .owner to struct snd_soc_card

Missed .owner of struct snd_soc_card will prevent the module from being
removed from underneath its users.
Reported-by: default avatarLothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 354a2142
...@@ -31,8 +31,6 @@ ...@@ -31,8 +31,6 @@
#define DRV_NAME "efika-audio-fabric" #define DRV_NAME "efika-audio-fabric"
static struct snd_soc_card card;
static struct snd_soc_dai_link efika_fabric_dai[] = { static struct snd_soc_dai_link efika_fabric_dai[] = {
{ {
.name = "AC97", .name = "AC97",
...@@ -52,6 +50,13 @@ static struct snd_soc_dai_link efika_fabric_dai[] = { ...@@ -52,6 +50,13 @@ static struct snd_soc_dai_link efika_fabric_dai[] = {
}, },
}; };
static struct snd_soc_card card = {
.name = "Efika",
.owner = THIS_MODULE,
.dai_link = efika_fabric_dai,
.num_links = ARRAY_SIZE(efika_fabric_dai),
};
static __init int efika_fabric_init(void) static __init int efika_fabric_init(void)
{ {
struct platform_device *pdev; struct platform_device *pdev;
...@@ -60,11 +65,6 @@ static __init int efika_fabric_init(void) ...@@ -60,11 +65,6 @@ static __init int efika_fabric_init(void)
if (!of_machine_is_compatible("bplan,efika")) if (!of_machine_is_compatible("bplan,efika"))
return -ENODEV; return -ENODEV;
card.name = "Efika";
card.dai_link = efika_fabric_dai;
card.num_links = ARRAY_SIZE(efika_fabric_dai);
pdev = platform_device_alloc("soc-audio", 1); pdev = platform_device_alloc("soc-audio", 1);
if (!pdev) { if (!pdev) {
pr_err("efika_fabric_init: platform_device_alloc() failed\n"); pr_err("efika_fabric_init: platform_device_alloc() failed\n");
......
...@@ -31,8 +31,6 @@ ...@@ -31,8 +31,6 @@
#define DRV_NAME "pcm030-audio-fabric" #define DRV_NAME "pcm030-audio-fabric"
static struct snd_soc_card card;
static struct snd_soc_dai_link pcm030_fabric_dai[] = { static struct snd_soc_dai_link pcm030_fabric_dai[] = {
{ {
.name = "AC97", .name = "AC97",
...@@ -52,6 +50,13 @@ static struct snd_soc_dai_link pcm030_fabric_dai[] = { ...@@ -52,6 +50,13 @@ static struct snd_soc_dai_link pcm030_fabric_dai[] = {
}, },
}; };
static struct snd_soc_card card = {
.name = "pcm030",
.owner = THIS_MODULE,
.dai_link = pcm030_fabric_dai,
.num_links = ARRAY_SIZE(pcm030_fabric_dai),
};
static __init int pcm030_fabric_init(void) static __init int pcm030_fabric_init(void)
{ {
struct platform_device *pdev; struct platform_device *pdev;
...@@ -60,11 +65,6 @@ static __init int pcm030_fabric_init(void) ...@@ -60,11 +65,6 @@ static __init int pcm030_fabric_init(void)
if (!of_machine_is_compatible("phytec,pcm030")) if (!of_machine_is_compatible("phytec,pcm030"))
return -ENODEV; return -ENODEV;
card.name = "pcm030";
card.dai_link = pcm030_fabric_dai;
card.num_links = ARRAY_SIZE(pcm030_fabric_dai);
pdev = platform_device_alloc("soc-audio", 1); pdev = platform_device_alloc("soc-audio", 1);
if (!pdev) { if (!pdev) {
pr_err("pcm030_fabric_init: platform_device_alloc() failed\n"); pr_err("pcm030_fabric_init: platform_device_alloc() failed\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment