aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-12-22 08:04:54 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-22 12:34:32 -0500
commit4c3c5df05e02bfa774517cebc5b91b07c2a365dc (patch)
tree7be8ebf38e89b7b17271fccb7036680b2ac5c4ec /sound/soc/fsl
parent354a21423d09c2a6afe0fcea9dbbda9cdada6e45 (diff)
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: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl')
-rw-r--r--sound/soc/fsl/efika-audio-fabric.c14
-rw-r--r--sound/soc/fsl/pcm030-audio-fabric.c14
2 files changed, 14 insertions, 14 deletions
diff --git a/sound/soc/fsl/efika-audio-fabric.c b/sound/soc/fsl/efika-audio-fabric.c
index 108b5d8bd0e9..b2acd3293ea8 100644
--- a/sound/soc/fsl/efika-audio-fabric.c
+++ b/sound/soc/fsl/efika-audio-fabric.c
@@ -31,8 +31,6 @@
31 31
32#define DRV_NAME "efika-audio-fabric" 32#define DRV_NAME "efika-audio-fabric"
33 33
34static struct snd_soc_card card;
35
36static struct snd_soc_dai_link efika_fabric_dai[] = { 34static struct snd_soc_dai_link efika_fabric_dai[] = {
37{ 35{
38 .name = "AC97", 36 .name = "AC97",
@@ -52,6 +50,13 @@ static struct snd_soc_dai_link efika_fabric_dai[] = {
52}, 50},
53}; 51};
54 52
53static struct snd_soc_card card = {
54 .name = "Efika",
55 .owner = THIS_MODULE,
56 .dai_link = efika_fabric_dai,
57 .num_links = ARRAY_SIZE(efika_fabric_dai),
58};
59
55static __init int efika_fabric_init(void) 60static __init int efika_fabric_init(void)
56{ 61{
57 struct platform_device *pdev; 62 struct platform_device *pdev;
@@ -60,11 +65,6 @@ static __init int efika_fabric_init(void)
60 if (!of_machine_is_compatible("bplan,efika")) 65 if (!of_machine_is_compatible("bplan,efika"))
61 return -ENODEV; 66 return -ENODEV;
62 67
63 card.name = "Efika";
64 card.dai_link = efika_fabric_dai;
65 card.num_links = ARRAY_SIZE(efika_fabric_dai);
66
67
68 pdev = platform_device_alloc("soc-audio", 1); 68 pdev = platform_device_alloc("soc-audio", 1);
69 if (!pdev) { 69 if (!pdev) {
70 pr_err("efika_fabric_init: platform_device_alloc() failed\n"); 70 pr_err("efika_fabric_init: platform_device_alloc() failed\n");
diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c
index ba4d85e317ed..b3af55dcde9d 100644
--- a/sound/soc/fsl/pcm030-audio-fabric.c
+++ b/sound/soc/fsl/pcm030-audio-fabric.c
@@ -31,8 +31,6 @@
31 31
32#define DRV_NAME "pcm030-audio-fabric" 32#define DRV_NAME "pcm030-audio-fabric"
33 33
34static struct snd_soc_card card;
35
36static struct snd_soc_dai_link pcm030_fabric_dai[] = { 34static struct snd_soc_dai_link pcm030_fabric_dai[] = {
37{ 35{
38 .name = "AC97", 36 .name = "AC97",
@@ -52,6 +50,13 @@ static struct snd_soc_dai_link pcm030_fabric_dai[] = {
52}, 50},
53}; 51};
54 52
53static struct snd_soc_card card = {
54 .name = "pcm030",
55 .owner = THIS_MODULE,
56 .dai_link = pcm030_fabric_dai,
57 .num_links = ARRAY_SIZE(pcm030_fabric_dai),
58};
59
55static __init int pcm030_fabric_init(void) 60static __init int pcm030_fabric_init(void)
56{ 61{
57 struct platform_device *pdev; 62 struct platform_device *pdev;
@@ -60,11 +65,6 @@ static __init int pcm030_fabric_init(void)
60 if (!of_machine_is_compatible("phytec,pcm030")) 65 if (!of_machine_is_compatible("phytec,pcm030"))
61 return -ENODEV; 66 return -ENODEV;
62 67
63
64 card.name = "pcm030";
65 card.dai_link = pcm030_fabric_dai;
66 card.num_links = ARRAY_SIZE(pcm030_fabric_dai);
67
68 pdev = platform_device_alloc("soc-audio", 1); 68 pdev = platform_device_alloc("soc-audio", 1);
69 if (!pdev) { 69 if (!pdev) {
70 pr_err("pcm030_fabric_init: platform_device_alloc() failed\n"); 70 pr_err("pcm030_fabric_init: platform_device_alloc() failed\n");