aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/blackfin/bf5xx-ad1980.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/blackfin/bf5xx-ad1980.c')
-rw-r--r--sound/soc/blackfin/bf5xx-ad1980.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/sound/soc/blackfin/bf5xx-ad1980.c b/sound/soc/blackfin/bf5xx-ad1980.c
index 92f7c327bb7a..d57c9c9c9883 100644
--- a/sound/soc/blackfin/bf5xx-ad1980.c
+++ b/sound/soc/blackfin/bf5xx-ad1980.c
@@ -56,10 +56,10 @@ static struct snd_soc_card bf5xx_board;
56static int bf5xx_board_startup(struct snd_pcm_substream *substream) 56static int bf5xx_board_startup(struct snd_pcm_substream *substream)
57{ 57{
58 struct snd_soc_pcm_runtime *rtd = substream->private_data; 58 struct snd_soc_pcm_runtime *rtd = substream->private_data;
59 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 59 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
60 60
61 pr_debug("%s enter\n", __func__); 61 pr_debug("%s enter\n", __func__);
62 cpu_dai->private_data = sport_handle; 62 snd_soc_dai_set_drvdata(cpu_dai, sport_handle);
63 return 0; 63 return 0;
64} 64}
65 65
@@ -70,23 +70,19 @@ static struct snd_soc_ops bf5xx_board_ops = {
70static struct snd_soc_dai_link bf5xx_board_dai = { 70static struct snd_soc_dai_link bf5xx_board_dai = {
71 .name = "AC97", 71 .name = "AC97",
72 .stream_name = "AC97 HiFi", 72 .stream_name = "AC97 HiFi",
73 .cpu_dai = &bfin_ac97_dai, 73 .cpu_dai_name = "bfin-ac97",
74 .codec_dai = &ad1980_dai, 74 .codec_dai_name = "ad1980-hifi",
75 .platform_name = "bfin-pcm-audio",
76 .codec_name = "ad1980-codec",
75 .ops = &bf5xx_board_ops, 77 .ops = &bf5xx_board_ops,
76}; 78};
77 79
78static struct snd_soc_card bf5xx_board = { 80static struct snd_soc_card bf5xx_board = {
79 .name = "bf5xx-board", 81 .name = "bf5xx-board",
80 .platform = &bf5xx_ac97_soc_platform,
81 .dai_link = &bf5xx_board_dai, 82 .dai_link = &bf5xx_board_dai,
82 .num_links = 1, 83 .num_links = 1,
83}; 84};
84 85
85static struct snd_soc_device bf5xx_board_snd_devdata = {
86 .card = &bf5xx_board,
87 .codec_dev = &soc_codec_dev_ad1980,
88};
89
90static struct platform_device *bf5xx_board_snd_device; 86static struct platform_device *bf5xx_board_snd_device;
91 87
92static int __init bf5xx_board_init(void) 88static int __init bf5xx_board_init(void)
@@ -97,8 +93,7 @@ static int __init bf5xx_board_init(void)
97 if (!bf5xx_board_snd_device) 93 if (!bf5xx_board_snd_device)
98 return -ENOMEM; 94 return -ENOMEM;
99 95
100 platform_set_drvdata(bf5xx_board_snd_device, &bf5xx_board_snd_devdata); 96 platform_set_drvdata(bf5xx_board_snd_device, &bf5xx_board);
101 bf5xx_board_snd_devdata.dev = &bf5xx_board_snd_device->dev;
102 ret = platform_device_add(bf5xx_board_snd_device); 97 ret = platform_device_add(bf5xx_board_snd_device);
103 98
104 if (ret) 99 if (ret)