summaryrefslogtreecommitdiff
path: root/sound/soc/meson
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-07-27 23:07:34 +0800
committerMark Brown <broonie@kernel.org>2019-07-31 12:08:25 +0100
commit9b2089313156ad16bd257217cc67e10597a82923 (patch)
tree3e5a38de3bb17477f5c7ddda32953e4c364c2888 /sound/soc/meson
parentc43fd289dd58951f3cfddb3bb66a6ed7747c5986 (diff)
ASoC: meson: axg-fifo: 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-31-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/meson')
-rw-r--r--sound/soc/meson/axg-fifo.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sound/soc/meson/axg-fifo.c b/sound/soc/meson/axg-fifo.c
index 01c1c7db2510..80a3dde35b5c 100644
--- a/sound/soc/meson/axg-fifo.c
+++ b/sound/soc/meson/axg-fifo.c
@@ -314,7 +314,6 @@ int axg_fifo_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
const struct axg_fifo_match_data *data;
struct axg_fifo *fifo;
- struct resource *res;
void __iomem *regs;
data = of_device_get_match_data(dev);
@@ -328,8 +327,7 @@ int axg_fifo_probe(struct platform_device *pdev)
return -ENOMEM;
platform_set_drvdata(pdev, fifo);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- regs = devm_ioremap_resource(dev, res);
+ regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs))
return PTR_ERR(regs);