diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-07-27 23:07:05 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-07-31 12:03:32 +0100 |
commit | 21cc4ea85879c1b424fb01caa6e481c14286f7f0 (patch) | |
tree | 45202fca8e8558bf9e82bd127a74f1feff8eed7e | |
parent | 2c4956bc1e9062e5e3c5ea7612294f24e6d4fbdd (diff) |
ASoC: tegra20_das: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190727150738.54764-2-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/tegra/tegra20_das.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/soc/tegra/tegra20_das.c b/sound/soc/tegra/tegra20_das.c index 10f9c3b19c88..1070b2710d5e 100644 --- a/sound/soc/tegra/tegra20_das.c +++ b/sound/soc/tegra/tegra20_das.c @@ -120,7 +120,6 @@ static const struct regmap_config tegra20_das_regmap_config = { static int tegra20_das_probe(struct platform_device *pdev) { - struct resource *res; void __iomem *regs; int ret = 0; @@ -134,8 +133,7 @@ static int tegra20_das_probe(struct platform_device *pdev) } das->dev = &pdev->dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(&pdev->dev, res); + regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(regs)) { ret = PTR_ERR(regs); goto err; |