diff options
Diffstat (limited to 'sound/soc/txx9/txx9aclc-generic.c')
-rw-r--r-- | sound/soc/txx9/txx9aclc-generic.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/sound/soc/txx9/txx9aclc-generic.c b/sound/soc/txx9/txx9aclc-generic.c index 95b17f731aec..6770e7166be4 100644 --- a/sound/soc/txx9/txx9aclc-generic.c +++ b/sound/soc/txx9/txx9aclc-generic.c | |||
@@ -19,54 +19,44 @@ | |||
19 | #include <sound/core.h> | 19 | #include <sound/core.h> |
20 | #include <sound/pcm.h> | 20 | #include <sound/pcm.h> |
21 | #include <sound/soc.h> | 21 | #include <sound/soc.h> |
22 | #include "../codecs/ac97.h" | ||
23 | #include "txx9aclc.h" | 22 | #include "txx9aclc.h" |
24 | 23 | ||
25 | static struct snd_soc_dai_link txx9aclc_generic_dai = { | 24 | static struct snd_soc_dai_link txx9aclc_generic_dai = { |
26 | .name = "AC97", | 25 | .name = "AC97", |
27 | .stream_name = "AC97 HiFi", | 26 | .stream_name = "AC97 HiFi", |
28 | .cpu_dai = &txx9aclc_ac97_dai, | 27 | .cpu_dai_name = "txx9aclc-ac97", |
29 | .codec_dai = &ac97_dai, | 28 | .codec_dai_name = "ac97-hifi", |
29 | .platform_name = "txx9aclc-pcm-audio", | ||
30 | .codec_name = "ac97-codec", | ||
30 | }; | 31 | }; |
31 | 32 | ||
32 | static struct snd_soc_card txx9aclc_generic_card = { | 33 | static struct snd_soc_card txx9aclc_generic_card = { |
33 | .name = "Generic TXx9 ACLC Audio", | 34 | .name = "Generic TXx9 ACLC Audio", |
34 | .platform = &txx9aclc_soc_platform, | ||
35 | .dai_link = &txx9aclc_generic_dai, | 35 | .dai_link = &txx9aclc_generic_dai, |
36 | .num_links = 1, | 36 | .num_links = 1, |
37 | }; | 37 | }; |
38 | 38 | ||
39 | static struct txx9aclc_soc_device txx9aclc_generic_soc_device = { | 39 | static struct platform_device *soc_pdev; |
40 | .soc_dev = { | ||
41 | .card = &txx9aclc_generic_card, | ||
42 | .codec_dev = &soc_codec_dev_ac97, | ||
43 | }, | ||
44 | }; | ||
45 | 40 | ||
46 | static int __init txx9aclc_generic_probe(struct platform_device *pdev) | 41 | static int __init txx9aclc_generic_probe(struct platform_device *pdev) |
47 | { | 42 | { |
48 | struct txx9aclc_soc_device *dev = &txx9aclc_generic_soc_device; | ||
49 | struct platform_device *soc_pdev; | ||
50 | int ret; | 43 | int ret; |
51 | 44 | ||
52 | soc_pdev = platform_device_alloc("soc-audio", -1); | 45 | soc_pdev = platform_device_alloc("soc-audio", -1); |
53 | if (!soc_pdev) | 46 | if (!soc_pdev) |
54 | return -ENOMEM; | 47 | return -ENOMEM; |
55 | platform_set_drvdata(soc_pdev, &dev->soc_dev); | 48 | platform_set_drvdata(soc_pdev, &txx9aclc_generic_card); |
56 | dev->soc_dev.dev = &soc_pdev->dev; | ||
57 | ret = platform_device_add(soc_pdev); | 49 | ret = platform_device_add(soc_pdev); |
58 | if (ret) { | 50 | if (ret) { |
59 | platform_device_put(soc_pdev); | 51 | platform_device_put(soc_pdev); |
60 | return ret; | 52 | return ret; |
61 | } | 53 | } |
62 | platform_set_drvdata(pdev, soc_pdev); | 54 | |
63 | return 0; | 55 | return 0; |
64 | } | 56 | } |
65 | 57 | ||
66 | static int __exit txx9aclc_generic_remove(struct platform_device *pdev) | 58 | static int __exit txx9aclc_generic_remove(struct platform_device *pdev) |
67 | { | 59 | { |
68 | struct platform_device *soc_pdev = platform_get_drvdata(pdev); | ||
69 | |||
70 | platform_device_unregister(soc_pdev); | 60 | platform_device_unregister(soc_pdev); |
71 | return 0; | 61 | return 0; |
72 | } | 62 | } |