summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/efika-audio-fabric.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-12-22 21:04:54 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-22 17:34:32 +0000
commit4c3c5df05e02bfa774517cebc5b91b07c2a365dc (patch)
tree7be8ebf38e89b7b17271fccb7036680b2ac5c4ec /sound/soc/fsl/efika-audio-fabric.c
parent354a21423d09c2a6afe0fcea9dbbda9cdada6e45 (diff)
downloadlinux-4c3c5df05e02bfa774517cebc5b91b07c2a365dc.tar.bz2
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/efika-audio-fabric.c')
-rw-r--r--sound/soc/fsl/efika-audio-fabric.c14
1 files changed, 7 insertions, 7 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 @@
#define DRV_NAME "efika-audio-fabric"
-static struct snd_soc_card card;
-
static struct snd_soc_dai_link efika_fabric_dai[] = {
{
.name = "AC97",
@@ -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)
{
struct platform_device *pdev;
@@ -60,11 +65,6 @@ static __init int efika_fabric_init(void)
if (!of_machine_is_compatible("bplan,efika"))
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);
if (!pdev) {
pr_err("efika_fabric_init: platform_device_alloc() failed\n");