ASoC: hdac_hda: use devm_snd_soc_register_component()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Fri, 7 Sep 2018 01:01:19 +0000 (01:01 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 10 Sep 2018 14:13:27 +0000 (15:13 +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/codecs/hdac_hda.c

index 8c25a1332fa7ee21946578eb8d9ba47c3b3faa29..2aaa83028e55f28a45e55081f67bd6ba335da45c 100644 (file)
@@ -448,7 +448,7 @@ static int hdac_hda_dev_probe(struct hdac_device *hdev)
                return -ENOMEM;
 
        /* ASoC specific initialization */
-       ret = snd_soc_register_component(&hdev->dev,
+       ret = devm_snd_soc_register_component(&hdev->dev,
                                         &hdac_hda_codec, hdac_hda_dais,
                                         ARRAY_SIZE(hdac_hda_dais));
        if (ret < 0) {
@@ -464,7 +464,6 @@ static int hdac_hda_dev_probe(struct hdac_device *hdev)
 
 static int hdac_hda_dev_remove(struct hdac_device *hdev)
 {
-       snd_soc_unregister_component(&hdev->dev);
        return 0;
 }