Skip to content

Commit

Permalink
drm/rockchip: dsi: Use devm_platform_get_and_ioremap_resource()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Yang Li authored and Heiko Stuebner committed Oct 9, 2023
1 parent 63a06c9 commit 253a1d3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 253a1d3

Please sign in to comment.