summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/lima/lima_device.c
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2020-04-21 23:51:37 +0100
committerQiang Yu <yuq825@gmail.com>2020-04-24 20:47:11 +0800
commit2ce216edf2c661fd9d2f5e19ce72fd80c25abc64 (patch)
tree39f3c34d6485fec57c773b779825d4df29878fad /drivers/gpu/drm/lima/lima_device.c
parent21d81f888299715ce6e1f0a04506aeb7c6012660 (diff)
drm/lima: Clean up redundant pdev pointer
There's no point explicitly tracking the platform device when it can be trivially derived from the regular device pointer in the couple of places it's ever used. Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/8d9073cc91c10fc70910587fd1794e0e8f32b467.1587509150.git.robin.murphy@arm.com
Diffstat (limited to 'drivers/gpu/drm/lima/lima_device.c')
-rw-r--r--drivers/gpu/drm/lima/lima_device.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/lima/lima_device.c b/drivers/gpu/drm/lima/lima_device.c
index c334d297796a..29285dedd124 100644
--- a/drivers/gpu/drm/lima/lima_device.c
+++ b/drivers/gpu/drm/lima/lima_device.c
@@ -297,8 +297,8 @@ static void lima_fini_pp_pipe(struct lima_device *dev)
int lima_device_init(struct lima_device *ldev)
{
+ struct platform_device *pdev = to_platform_device(ldev->dev);
int err, i;
- struct resource *res;
dma_set_coherent_mask(ldev->dev, DMA_BIT_MASK(32));
@@ -329,8 +329,7 @@ int lima_device_init(struct lima_device *ldev)
} else
ldev->va_end = LIMA_VA_RESERVE_END;
- res = platform_get_resource(ldev->pdev, IORESOURCE_MEM, 0);
- ldev->iomem = devm_ioremap_resource(ldev->dev, res);
+ ldev->iomem = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(ldev->iomem)) {
dev_err(ldev->dev, "fail to ioremap iomem\n");
err = PTR_ERR(ldev->iomem);