diff options
author | Cai Huoqing | 2021-09-08 15:15:42 +0800 |
---|---|---|
committer | Neil Armstrong | 2021-09-13 09:43:00 +0200 |
commit | 97a4a24087ce354ce0318449e6bd9e660f5c573b (patch) | |
tree | eee9f245a7f5fd665f329e8e8276b11daff7b54f /drivers/soc/amlogic | |
parent | ca8d1fda5b7d2f81ba9c5649462a7c0b64ae9dcd (diff) |
soc: amlogic: canvas: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20210908071544.603-1-caihuoqing@baidu.com
Diffstat (limited to 'drivers/soc/amlogic')
-rw-r--r-- | drivers/soc/amlogic/meson-canvas.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/soc/amlogic/meson-canvas.c b/drivers/soc/amlogic/meson-canvas.c index d0329ad170d1..383b0cfc584e 100644 --- a/drivers/soc/amlogic/meson-canvas.c +++ b/drivers/soc/amlogic/meson-canvas.c @@ -168,7 +168,6 @@ EXPORT_SYMBOL_GPL(meson_canvas_free); static int meson_canvas_probe(struct platform_device *pdev) { - struct resource *res; struct meson_canvas *canvas; struct device *dev = &pdev->dev; @@ -176,8 +175,7 @@ static int meson_canvas_probe(struct platform_device *pdev) if (!canvas) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - canvas->reg_base = devm_ioremap_resource(dev, res); + canvas->reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(canvas->reg_base)) return PTR_ERR(canvas->reg_base); |