]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: samsung-i2s: Use devm_snd_soc_register_component()
authorMark Brown <broonie@linaro.org>
Wed, 4 Sep 2013 19:37:51 +0000 (20:37 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 16 Sep 2013 23:51:05 +0000 (00:51 +0100)
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/samsung/i2s.c

index a7e3519ad7c4698df4c8ce95c4ee572a9bad2577..32956df8f50ce3d50082f66cb5ad1fa89f8d2009 100644 (file)
@@ -1143,9 +1143,9 @@ static int samsung_i2s_probe(struct platform_device *pdev)
                        dev_err(&pdev->dev, "Unable to get drvdata\n");
                        return -EFAULT;
                }
-               snd_soc_register_component(&sec_dai->pdev->dev,
-                                          &samsung_i2s_component,
-                                          &sec_dai->i2s_dai_drv, 1);
+               devm_snd_soc_register_component(&sec_dai->pdev->dev,
+                                               &samsung_i2s_component,
+                                               &sec_dai->i2s_dai_drv, 1);
                samsung_asoc_dma_platform_register(&pdev->dev);
                return 0;
        }
@@ -1258,8 +1258,9 @@ static int samsung_i2s_probe(struct platform_device *pdev)
                goto err;
        }
 
-       snd_soc_register_component(&pri_dai->pdev->dev, &samsung_i2s_component,
-                                  &pri_dai->i2s_dai_drv, 1);
+       devm_snd_soc_register_component(&pri_dai->pdev->dev,
+                                       &samsung_i2s_component,
+                                       &pri_dai->i2s_dai_drv, 1);
 
        pm_runtime_enable(&pdev->dev);
 
@@ -1294,7 +1295,6 @@ static int samsung_i2s_remove(struct platform_device *pdev)
        i2s->sec_dai = NULL;
 
        samsung_asoc_dma_platform_unregister(&pdev->dev);
-       snd_soc_unregister_component(&pdev->dev);
 
        return 0;
 }