summaryrefslogtreecommitdiff
path: root/sound/soc/spear/spdif_in.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2013-05-08 13:47:38 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-05-12 22:03:12 +0400
commitbfcc74e6101a978b3987e767815595e5a9fec2ca (patch)
treeeb7f22bab0edcd1344252c1d6cb848735bbd731b /sound/soc/spear/spdif_in.c
parent52c102e534fd46a25aacab37bbaaa593929a2ca1 (diff)
downloadlinux-bfcc74e6101a978b3987e767815595e5a9fec2ca.tar.xz
ASoC: SPEAr spdif_{in,out}: use devm for clk and a few more cleanups
Drop dev_set_drvdata as this is handled in the core and use devm_request_and_ioremap instead of devm_ioremap to properly register the address range used Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/spear/spdif_in.c')
-rw-r--r--sound/soc/spear/spdif_in.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sound/soc/spear/spdif_in.c b/sound/soc/spear/spdif_in.c
index 82c838753c06..643ada6a1fa5 100644
--- a/sound/soc/spear/spdif_in.c
+++ b/sound/soc/spear/spdif_in.c
@@ -231,7 +231,7 @@ static int spdif_in_probe(struct platform_device *pdev)
if (host->irq < 0)
return -EINVAL;
- host->clk = clk_get(&pdev->dev, NULL);
+ host->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(host->clk))
return PTR_ERR(host->clk);
@@ -253,7 +253,6 @@ static int spdif_in_probe(struct platform_device *pdev)
ret = devm_request_irq(&pdev->dev, host->irq, spdif_in_irq, 0,
"spdif-in", host);
if (ret) {
- clk_put(host->clk);
dev_warn(&pdev->dev, "request_irq failed\n");
return ret;
}
@@ -273,14 +272,10 @@ static int spdif_in_remove(struct platform_device *pdev)
struct spdif_in_dev *host = dev_get_drvdata(&pdev->dev);
snd_soc_unregister_component(&pdev->dev);
- dev_set_drvdata(&pdev->dev, NULL);
-
- clk_put(host->clk);
return 0;
}
-
static struct platform_driver spdif_in_driver = {
.probe = spdif_in_probe,
.remove = spdif_in_remove,