aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-03-21 06:35:22 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-26 17:57:31 -0400
commiteca3b01d0885544cbf452c5298afd7c3ccb53a50 (patch)
tree9c5756f6cc9e2a85dfc4192962be48896753ea51
parent5642ddff274172b42bb9d1f77b75e006a33b65b2 (diff)
ASoC: switch over to use snd_soc_register_component() on s3c i2s
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/samsung/s3c-i2s-v2.c9
-rw-r--r--sound/soc/samsung/s3c-i2s-v2.h7
-rw-r--r--sound/soc/samsung/s3c2412-i2s.c12
3 files changed, 18 insertions, 10 deletions
diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c
index 7a73380b3560..20e98d1dded2 100644
--- a/sound/soc/samsung/s3c-i2s-v2.c
+++ b/sound/soc/samsung/s3c-i2s-v2.c
@@ -731,8 +731,9 @@ static int s3c2412_i2s_resume(struct snd_soc_dai *dai)
731#define s3c2412_i2s_resume NULL 731#define s3c2412_i2s_resume NULL
732#endif 732#endif
733 733
734int s3c_i2sv2_register_dai(struct device *dev, int id, 734int s3c_i2sv2_register_component(struct device *dev, int id,
735 struct snd_soc_dai_driver *drv) 735 struct snd_soc_component_driver *cmp_drv,
736 struct snd_soc_dai_driver *dai_drv)
736{ 737{
737 struct snd_soc_dai_ops *ops = drv->ops; 738 struct snd_soc_dai_ops *ops = drv->ops;
738 739
@@ -750,8 +751,8 @@ int s3c_i2sv2_register_dai(struct device *dev, int id,
750 drv->suspend = s3c2412_i2s_suspend; 751 drv->suspend = s3c2412_i2s_suspend;
751 drv->resume = s3c2412_i2s_resume; 752 drv->resume = s3c2412_i2s_resume;
752 753
753 return snd_soc_register_dai(dev, drv); 754 return snd_soc_register_component(dev, cmp_drv, dai_drv, 1);
754} 755}
755EXPORT_SYMBOL_GPL(s3c_i2sv2_register_dai); 756EXPORT_SYMBOL_GPL(s3c_i2sv2_register_component);
756 757
757MODULE_LICENSE("GPL"); 758MODULE_LICENSE("GPL");
diff --git a/sound/soc/samsung/s3c-i2s-v2.h b/sound/soc/samsung/s3c-i2s-v2.h
index f8297d9bb8a3..90abab364b49 100644
--- a/sound/soc/samsung/s3c-i2s-v2.h
+++ b/sound/soc/samsung/s3c-i2s-v2.h
@@ -92,7 +92,7 @@ extern int s3c_i2sv2_probe(struct snd_soc_dai *dai,
92 unsigned long base); 92 unsigned long base);
93 93
94/** 94/**
95 * s3c_i2sv2_register_dai - register dai with soc core 95 * s3c_i2sv2_register_component - register component and dai with soc core
96 * @dev: DAI device 96 * @dev: DAI device
97 * @id: DAI ID 97 * @id: DAI ID
98 * @drv: The driver structure to register 98 * @drv: The driver structure to register
@@ -100,7 +100,8 @@ extern int s3c_i2sv2_probe(struct snd_soc_dai *dai,
100 * Fill in any missing fields and then register the given dai with the 100 * Fill in any missing fields and then register the given dai with the
101 * soc core. 101 * soc core.
102 */ 102 */
103extern int s3c_i2sv2_register_dai(struct device *dev, int id, 103extern int s3c_i2sv2_register_component(struct device *dev, int id,
104 struct snd_soc_dai_driver *drv); 104 struct snd_soc_component_driver *cmp_drv,
105 struct snd_soc_dai_driver *dai_drv);
105 106
106#endif /* __SND_SOC_S3C24XX_S3C_I2SV2_I2S_H */ 107#endif /* __SND_SOC_S3C24XX_S3C_I2SV2_I2S_H */
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
index 221337716393..47e23864ea72 100644
--- a/sound/soc/samsung/s3c2412-i2s.c
+++ b/sound/soc/samsung/s3c2412-i2s.c
@@ -160,11 +160,17 @@ static struct snd_soc_dai_driver s3c2412_i2s_dai = {
160 .ops = &s3c2412_i2s_dai_ops, 160 .ops = &s3c2412_i2s_dai_ops,
161}; 161};
162 162
163static const struct snd_soc_component_driver s3c2412_i2s_component = {
164 .name = "s3c2412-i2s",
165};
166
163static int s3c2412_iis_dev_probe(struct platform_device *pdev) 167static int s3c2412_iis_dev_probe(struct platform_device *pdev)
164{ 168{
165 int ret = 0; 169 int ret = 0;
166 170
167 ret = s3c_i2sv2_register_dai(&pdev->dev, -1, &s3c2412_i2s_dai); 171 ret = s3c_i2sv2_register_component(&pdev->dev, -1,
172 &s3c2412_i2s_component,
173 &s3c2412_i2s_dai);
168 if (ret) { 174 if (ret) {
169 pr_err("failed to register the dai\n"); 175 pr_err("failed to register the dai\n");
170 return ret; 176 return ret;
@@ -178,14 +184,14 @@ static int s3c2412_iis_dev_probe(struct platform_device *pdev)
178 184
179 return 0; 185 return 0;
180err: 186err:
181 snd_soc_unregister_dai(&pdev->dev); 187 snd_soc_unregister_component(&pdev->dev);
182 return ret; 188 return ret;
183} 189}
184 190
185static int s3c2412_iis_dev_remove(struct platform_device *pdev) 191static int s3c2412_iis_dev_remove(struct platform_device *pdev)
186{ 192{
187 asoc_dma_platform_unregister(&pdev->dev); 193 asoc_dma_platform_unregister(&pdev->dev);
188 snd_soc_unregister_dai(&pdev->dev); 194 snd_soc_unregister_component(&pdev->dev);
189 return 0; 195 return 0;
190} 196}
191 197