ASoC: intel: broadwell: Convert to devm_snd_soc_register_card
authorAxel Lin <axel.lin@ingics.com>
Wed, 2 Sep 2015 04:01:27 +0000 (12:01 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 14 Sep 2015 17:39:23 +0000 (18:39 +0100)
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/broadwell.c

index 8bafaf6ceab1266f6b85a0d6ca1e4ee04bc5046f..3f8a1e10bed02841f6b437d3d4a24615879ca35e 100644 (file)
@@ -266,18 +266,11 @@ static int broadwell_audio_probe(struct platform_device *pdev)
 {
        broadwell_rt286.dev = &pdev->dev;
 
-       return snd_soc_register_card(&broadwell_rt286);
-}
-
-static int broadwell_audio_remove(struct platform_device *pdev)
-{
-       snd_soc_unregister_card(&broadwell_rt286);
-       return 0;
+       return devm_snd_soc_register_card(&pdev->dev, &broadwell_rt286);
 }
 
 static struct platform_driver broadwell_audio = {
        .probe = broadwell_audio_probe,
-       .remove = broadwell_audio_remove,
        .driver = {
                .name = "broadwell-audio",
        },