diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-08-31 16:57:30 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2021-10-07 05:42:18 +0300 |
commit | e29505caa32de522cdca35909015be02e3393750 (patch) | |
tree | e6fb91f383896df816ccab04ec469e2b49268505 /drivers/gpu/drm/shmobile | |
parent | 668b51361fb40fcfaac5f065ad625c9c3a4185e1 (diff) | |
download | linux-e29505caa32de522cdca35909015be02e3393750.tar.xz |
drm/shmobile: 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: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/shmobile')
-rw-r--r-- | drivers/gpu/drm/shmobile/shmob_drm_drv.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c index 7db01904d18d..80078a9fd7f6 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c @@ -192,7 +192,6 @@ static int shmob_drm_probe(struct platform_device *pdev) struct shmob_drm_platform_data *pdata = pdev->dev.platform_data; struct shmob_drm_device *sdev; struct drm_device *ddev; - struct resource *res; unsigned int i; int ret; @@ -215,8 +214,7 @@ static int shmob_drm_probe(struct platform_device *pdev) platform_set_drvdata(pdev, sdev); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - sdev->mmio = devm_ioremap_resource(&pdev->dev, res); + sdev->mmio = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(sdev->mmio)) return PTR_ERR(sdev->mmio); |