aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-09-17 01:11:37 -0400
committerMark Brown <broonie@linaro.org>2013-09-18 06:41:56 -0400
commit77aea716872fd976cbb9706b4588cf1fb9d52826 (patch)
tree0210b2b8ade0c43f8258107eec819930087eb198
parent5fb7680bd0035525eb1534001f7b7f2ca06a8ab7 (diff)
ASoC: SPEAr spdif_out: Use devm_snd_soc_register_component
devm_snd_soc_register_component makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/spear/spdif_out.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c
index 2fdf68c98d22..70fc4d687529 100644
--- a/sound/soc/spear/spdif_out.c
+++ b/sound/soc/spear/spdif_out.c
@@ -307,18 +307,11 @@ static int spdif_out_probe(struct platform_device *pdev)
307 307
308 dev_set_drvdata(&pdev->dev, host); 308 dev_set_drvdata(&pdev->dev, host);
309 309
310 ret = snd_soc_register_component(&pdev->dev, &spdif_out_component, 310 ret = devm_snd_soc_register_component(&pdev->dev, &spdif_out_component,
311 &spdif_out_dai, 1); 311 &spdif_out_dai, 1);
312 return ret; 312 return ret;
313} 313}
314 314
315static int spdif_out_remove(struct platform_device *pdev)
316{
317 snd_soc_unregister_component(&pdev->dev);
318
319 return 0;
320}
321
322#ifdef CONFIG_PM 315#ifdef CONFIG_PM
323static int spdif_out_suspend(struct device *dev) 316static int spdif_out_suspend(struct device *dev)
324{ 317{
@@ -357,7 +350,6 @@ static SIMPLE_DEV_PM_OPS(spdif_out_dev_pm_ops, spdif_out_suspend, \
357 350
358static struct platform_driver spdif_out_driver = { 351static struct platform_driver spdif_out_driver = {
359 .probe = spdif_out_probe, 352 .probe = spdif_out_probe,
360 .remove = spdif_out_remove,
361 .driver = { 353 .driver = {
362 .name = "spdif-out", 354 .name = "spdif-out",
363 .owner = THIS_MODULE, 355 .owner = THIS_MODULE,