Commit eca3b01d authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: switch over to use snd_soc_register_component() on s3c i2s

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 5642ddff
...@@ -731,8 +731,9 @@ static int s3c2412_i2s_resume(struct snd_soc_dai *dai) ...@@ -731,8 +731,9 @@ static int s3c2412_i2s_resume(struct snd_soc_dai *dai)
#define s3c2412_i2s_resume NULL #define s3c2412_i2s_resume NULL
#endif #endif
int s3c_i2sv2_register_dai(struct device *dev, int id, int s3c_i2sv2_register_component(struct device *dev, int id,
struct snd_soc_dai_driver *drv) struct snd_soc_component_driver *cmp_drv,
struct snd_soc_dai_driver *dai_drv)
{ {
struct snd_soc_dai_ops *ops = drv->ops; struct snd_soc_dai_ops *ops = drv->ops;
...@@ -750,8 +751,8 @@ int s3c_i2sv2_register_dai(struct device *dev, int id, ...@@ -750,8 +751,8 @@ int s3c_i2sv2_register_dai(struct device *dev, int id,
drv->suspend = s3c2412_i2s_suspend; drv->suspend = s3c2412_i2s_suspend;
drv->resume = s3c2412_i2s_resume; drv->resume = s3c2412_i2s_resume;
return snd_soc_register_dai(dev, drv); return snd_soc_register_component(dev, cmp_drv, dai_drv, 1);
} }
EXPORT_SYMBOL_GPL(s3c_i2sv2_register_dai); EXPORT_SYMBOL_GPL(s3c_i2sv2_register_component);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -92,7 +92,7 @@ extern int s3c_i2sv2_probe(struct snd_soc_dai *dai, ...@@ -92,7 +92,7 @@ extern int s3c_i2sv2_probe(struct snd_soc_dai *dai,
unsigned long base); unsigned long base);
/** /**
* s3c_i2sv2_register_dai - register dai with soc core * s3c_i2sv2_register_component - register component and dai with soc core
* @dev: DAI device * @dev: DAI device
* @id: DAI ID * @id: DAI ID
* @drv: The driver structure to register * @drv: The driver structure to register
...@@ -100,7 +100,8 @@ extern int s3c_i2sv2_probe(struct snd_soc_dai *dai, ...@@ -100,7 +100,8 @@ extern int s3c_i2sv2_probe(struct snd_soc_dai *dai,
* Fill in any missing fields and then register the given dai with the * Fill in any missing fields and then register the given dai with the
* soc core. * soc core.
*/ */
extern int s3c_i2sv2_register_dai(struct device *dev, int id, extern int s3c_i2sv2_register_component(struct device *dev, int id,
struct snd_soc_dai_driver *drv); struct snd_soc_component_driver *cmp_drv,
struct snd_soc_dai_driver *dai_drv);
#endif /* __SND_SOC_S3C24XX_S3C_I2SV2_I2S_H */ #endif /* __SND_SOC_S3C24XX_S3C_I2SV2_I2S_H */
...@@ -160,11 +160,17 @@ static struct snd_soc_dai_driver s3c2412_i2s_dai = { ...@@ -160,11 +160,17 @@ static struct snd_soc_dai_driver s3c2412_i2s_dai = {
.ops = &s3c2412_i2s_dai_ops, .ops = &s3c2412_i2s_dai_ops,
}; };
static const struct snd_soc_component_driver s3c2412_i2s_component = {
.name = "s3c2412-i2s",
};
static int s3c2412_iis_dev_probe(struct platform_device *pdev) static int s3c2412_iis_dev_probe(struct platform_device *pdev)
{ {
int ret = 0; int ret = 0;
ret = s3c_i2sv2_register_dai(&pdev->dev, -1, &s3c2412_i2s_dai); ret = s3c_i2sv2_register_component(&pdev->dev, -1,
&s3c2412_i2s_component,
&s3c2412_i2s_dai);
if (ret) { if (ret) {
pr_err("failed to register the dai\n"); pr_err("failed to register the dai\n");
return ret; return ret;
...@@ -178,14 +184,14 @@ static int s3c2412_iis_dev_probe(struct platform_device *pdev) ...@@ -178,14 +184,14 @@ static int s3c2412_iis_dev_probe(struct platform_device *pdev)
return 0; return 0;
err: err:
snd_soc_unregister_dai(&pdev->dev); snd_soc_unregister_component(&pdev->dev);
return ret; return ret;
} }
static int s3c2412_iis_dev_remove(struct platform_device *pdev) static int s3c2412_iis_dev_remove(struct platform_device *pdev)
{ {
asoc_dma_platform_unregister(&pdev->dev); asoc_dma_platform_unregister(&pdev->dev);
snd_soc_unregister_dai(&pdev->dev); snd_soc_unregister_component(&pdev->dev);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment