ASoC: nuc900: use devm_snd_soc_register_component()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 7 Sep 2018 01:02:38 +0000 (01:02 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 10 Sep 2018 14:14:14 +0000 (15:14 +0100)
Now we have devm_snd_soc_register_component().
Let's use it instead of snd_soc_register_component().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/nuc900/nuc900-ac97.c

index 81b09d740ed96ee39eeed88705305d46051c45da..6384bb6dacfd2d563056da10f28f1279751d46c6 100644 (file)
@@ -356,7 +356,7 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev)
        if (ret)
                goto out;
 
-       ret = snd_soc_register_component(&pdev->dev, &nuc900_ac97_component,
+       ret = devm_snd_soc_register_component(&pdev->dev, &nuc900_ac97_component,
                                         &nuc900_ac97_dai, 1);
        if (ret)
                goto out;
@@ -373,8 +373,6 @@ out:
 
 static int nuc900_ac97_drvremove(struct platform_device *pdev)
 {
-       snd_soc_unregister_component(&pdev->dev);
-
        nuc900_ac97_data = NULL;
        snd_soc_set_ac97_ops(NULL);