diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-12-22 08:04:54 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-22 12:34:32 -0500 |
commit | 4c3c5df05e02bfa774517cebc5b91b07c2a365dc (patch) | |
tree | 7be8ebf38e89b7b17271fccb7036680b2ac5c4ec /sound | |
parent | 354a21423d09c2a6afe0fcea9dbbda9cdada6e45 (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')
-rw-r--r-- | sound/soc/fsl/efika-audio-fabric.c | 14 | ||||
-rw-r--r-- | sound/soc/fsl/pcm030-audio-fabric.c | 14 |
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 | ||
34 | static struct snd_soc_card card; | ||
35 | |||
36 | static struct snd_soc_dai_link efika_fabric_dai[] = { | 34 | static 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 | ||
53 | static 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 | |||
55 | static __init int efika_fabric_init(void) | 60 | static __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 | ||
34 | static struct snd_soc_card card; | ||
35 | |||
36 | static struct snd_soc_dai_link pcm030_fabric_dai[] = { | 34 | static 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 | ||
53 | static 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 | |||
55 | static __init int pcm030_fabric_init(void) | 60 | static __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"); |