ASoC: switch over to use snd_soc_register_component() on samsung spdif
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Thu, 21 Mar 2013 10:35:44 +0000 (03:35 -0700)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 26 Mar 2013 21:57:39 +0000 (21:57 +0000)
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/samsung/spdif.c

index 5008e5bd6ed8072c62a0b9feb34f136497801b50..2e5ebb2f1982c2e849e8a8adc7924034a6931675 100644 (file)
@@ -357,6 +357,10 @@ static struct snd_soc_dai_driver samsung_spdif_dai = {
        .resume = spdif_resume,
 };
 
+static const struct snd_soc_component_driver samsung_spdif_component = {
+       .name           = "samsung-spdif",
+};
+
 static int spdif_probe(struct platform_device *pdev)
 {
        struct s3c_audio_pdata *spdif_pdata;
@@ -424,7 +428,8 @@ static int spdif_probe(struct platform_device *pdev)
 
        dev_set_drvdata(&pdev->dev, spdif);
 
-       ret = snd_soc_register_dai(&pdev->dev, &samsung_spdif_dai);
+       ret = snd_soc_register_component(&pdev->dev, &samsung_spdif_component,
+                                        &samsung_spdif_dai, 1);
        if (ret != 0) {
                dev_err(&pdev->dev, "fail to register dai\n");
                goto err4;
@@ -445,7 +450,7 @@ static int spdif_probe(struct platform_device *pdev)
 
        return 0;
 err5:
-       snd_soc_unregister_dai(&pdev->dev);
+       snd_soc_unregister_component(&pdev->dev);
 err4:
        iounmap(spdif->regs);
 err3:
@@ -466,7 +471,7 @@ static int spdif_remove(struct platform_device *pdev)
        struct resource *mem_res;
 
        asoc_dma_platform_unregister(&pdev->dev);
-       snd_soc_unregister_dai(&pdev->dev);
+       snd_soc_unregister_component(&pdev->dev);
 
        iounmap(spdif->regs);