summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Li <yang.lee@linux.alibaba.com>2023-04-21 11:13:03 +0300
committerHeiko Stuebner <heiko@sntech.de>2023-10-09 22:52:45 +0300
commit253a1d33e5cfdf62525f5d6ed2bf03acbadd1582 (patch)
tree9f7a4bca81ecdc3680f2b44957d2de25d8143656
parent63a06c9fe30bf84d1ab6f07d0e408bd1d4ccaf85 (diff)
downloadlinux-253a1d33e5cfdf62525f5d6ed2bf03acbadd1582.tar.xz
drm/rockchip: dsi: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230421081303.122452-1-yang.lee@linux.alibaba.com
-rw-r--r--drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
index 8bafb2a2747f..6396f9324dab 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
@@ -1358,8 +1358,7 @@ static int dw_mipi_dsi_rockchip_probe(struct platform_device *pdev)
if (!dsi)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dsi->base = devm_ioremap_resource(dev, res);
+ dsi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(dsi->base)) {
DRM_DEV_ERROR(dev, "Unable to get dsi registers\n");
return PTR_ERR(dsi->base);