diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-08-31 21:57:39 +0800 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2021-09-01 11:43:29 +0200 |
commit | f5df171f93d31348fa133368edf77aa8a0314467 (patch) | |
tree | 6bd3d5cd887daf2e4bc8e65cc36be1f4edd89d7f /drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | |
parent | drm/vc4: Make use of the helper function devm_platform_ioremap_resource() (diff) | |
download | linux-dev-f5df171f93d31348fa133368edf77aa8a0314467.tar.xz linux-dev-f5df171f93d31348fa133368edf77aa8a0314467.zip |
drm/sun4i: 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: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20210831135740.4826-1-caihuoqing@baidu.com
Diffstat (limited to 'drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c')
-rw-r--r-- | drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 4f5efcace68e..4371684697bd 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -1104,7 +1104,6 @@ static int sun6i_dsi_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; const char *bus_clk_name = NULL; struct sun6i_dsi *dsi; - struct resource *res; void __iomem *base; int ret; @@ -1120,8 +1119,7 @@ static int sun6i_dsi_probe(struct platform_device *pdev) "allwinner,sun6i-a31-mipi-dsi")) bus_clk_name = "bus"; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) { dev_err(dev, "Couldn't map the DSI encoder registers\n"); return PTR_ERR(base); |