Skip to content

Commit

Permalink
drm/shmobile: Make use of the helper function devm_platform_ioremap_r…
Browse files Browse the repository at this point in the history
…esource()

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>
  • Loading branch information
Cai Huoqing authored and Laurent Pinchart committed Oct 7, 2021
1 parent 668b513 commit e29505c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/gpu/drm/shmobile/shmob_drm_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);

Expand Down

0 comments on commit e29505c

Please sign in to comment.