Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 026240bb authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

ASoC: switch over to use snd_soc_register_component() on mxs saif

parent b1c36861
Loading
Loading
Loading
Loading
+8 −3
Original line number Original line Diff line number Diff line
@@ -627,6 +627,10 @@ static struct snd_soc_dai_driver mxs_saif_dai = {
	.ops = &mxs_saif_dai_ops,
	.ops = &mxs_saif_dai_ops,
};
};


static const struct snd_soc_component_driver mxs_saif_component = {
	.name		= "mxs-saif",
};

static irqreturn_t mxs_saif_irq(int irq, void *dev_id)
static irqreturn_t mxs_saif_irq(int irq, void *dev_id)
{
{
	struct mxs_saif *saif = dev_id;
	struct mxs_saif *saif = dev_id;
@@ -763,7 +767,8 @@ static int mxs_saif_probe(struct platform_device *pdev)


	platform_set_drvdata(pdev, saif);
	platform_set_drvdata(pdev, saif);


	ret = snd_soc_register_dai(&pdev->dev, &mxs_saif_dai);
	ret = snd_soc_register_component(&pdev->dev, &mxs_saif_component,
					 &mxs_saif_dai, 1);
	if (ret) {
	if (ret) {
		dev_err(&pdev->dev, "register DAI failed\n");
		dev_err(&pdev->dev, "register DAI failed\n");
		return ret;
		return ret;
@@ -778,7 +783,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
	return 0;
	return 0;


failed_pdev_alloc:
failed_pdev_alloc:
	snd_soc_unregister_dai(&pdev->dev);
	snd_soc_unregister_component(&pdev->dev);


	return ret;
	return ret;
}
}
@@ -786,7 +791,7 @@ static int mxs_saif_probe(struct platform_device *pdev)
static int mxs_saif_remove(struct platform_device *pdev)
static int mxs_saif_remove(struct platform_device *pdev)
{
{
	mxs_pcm_platform_unregister(&pdev->dev);
	mxs_pcm_platform_unregister(&pdev->dev);
	snd_soc_unregister_dai(&pdev->dev);
	snd_soc_unregister_component(&pdev->dev);


	return 0;
	return 0;
}
}