summaryrefslogtreecommitdiffstats
path: root/sound/soc/tegra/tegra30_i2s.c
diff options
context:
space:
mode:
authorDmitry Osipenko <digetx@gmail.com>2021-03-14 16:44:55 +0100
committerMark Brown <broonie@kernel.org>2021-03-18 14:49:41 +0100
commit52674aef9eb678f30d99f77fd53f6c564d5e2d92 (patch)
treea6829d42c81e7589839b1a4ebe87d91b7ac42580 /sound/soc/tegra/tegra30_i2s.c
parentASoC: tegra30: i2s: Correct driver removal order (diff)
downloadlinux-52674aef9eb678f30d99f77fd53f6c564d5e2d92.tar.xz
linux-52674aef9eb678f30d99f77fd53f6c564d5e2d92.zip
ASoC: tegra30: i2s: Use devm_clk_get()
Use resource-managed variant of clk_get() to simplify code. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20210314154459.15375-14-digetx@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/tegra/tegra30_i2s.c')
-rw-r--r--sound/soc/tegra/tegra30_i2s.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c
index 31e08c5c1405..0ed982548ce4 100644
--- a/sound/soc/tegra/tegra30_i2s.c
+++ b/sound/soc/tegra/tegra30_i2s.c
@@ -438,7 +438,7 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev)
i2s->playback_i2s_cif = cif_ids[0];
i2s->capture_i2s_cif = cif_ids[1];
- i2s->clk_i2s = clk_get(&pdev->dev, NULL);
+ i2s->clk_i2s = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(i2s->clk_i2s)) {
dev_err(&pdev->dev, "Can't retrieve i2s clock\n");
ret = PTR_ERR(i2s->clk_i2s);
@@ -448,7 +448,7 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev)
regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs)) {
ret = PTR_ERR(regs);
- goto err_clk_put;
+ goto err;
}
i2s->regmap = devm_regmap_init_mmio(&pdev->dev, regs,
@@ -456,7 +456,7 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev)
if (IS_ERR(i2s->regmap)) {
dev_err(&pdev->dev, "regmap init failed\n");
ret = PTR_ERR(i2s->regmap);
- goto err_clk_put;
+ goto err;
}
regcache_cache_only(i2s->regmap, true);
@@ -534,8 +534,6 @@ err_suspend:
tegra30_i2s_runtime_suspend(&pdev->dev);
err_pm_disable:
pm_runtime_disable(&pdev->dev);
-err_clk_put:
- clk_put(i2s->clk_i2s);
err:
return ret;
}
@@ -557,8 +555,6 @@ static int tegra30_i2s_platform_remove(struct platform_device *pdev)
if (!pm_runtime_status_suspended(&pdev->dev))
tegra30_i2s_runtime_suspend(&pdev->dev);
- clk_put(i2s->clk_i2s);
-
return 0;
}