mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 17:01:14 +00:00
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>
This commit is contained in:
parent
5642ddff27
commit
eca3b01d08
3 changed files with 18 additions and 10 deletions
|
@ -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,
|
||||||
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,
|
||||||
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,
|
||||||
* 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 = {
|
||||||
.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)
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue