diff options
author | Fabio Estevam <festevam@gmail.com> | 2019-06-05 19:57:02 +0200 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2019-08-02 19:14:52 +0200 |
commit | facb180d3a519040e877eb3a6810c4fc53320ed7 (patch) | |
tree | afadf92c63db05d8ea8143ea92c5929ad6d80693 | |
parent | drm/etnaviv: drop use of drmP.h (diff) | |
download | linux-facb180d3a519040e877eb3a6810c4fc53320ed7.tar.xz linux-facb180d3a519040e877eb3a6810c4fc53320ed7.zip |
drm/etnaviv: Use devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify the code a bit.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index 6b1d7fb37c24..4ea3d12f2fd4 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c @@ -1716,7 +1716,6 @@ static int etnaviv_gpu_platform_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct etnaviv_gpu *gpu; - struct resource *res; int err; gpu = devm_kzalloc(dev, sizeof(*gpu), GFP_KERNEL); @@ -1728,8 +1727,7 @@ static int etnaviv_gpu_platform_probe(struct platform_device *pdev) mutex_init(&gpu->fence_lock); /* Map registers: */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - gpu->mmio = devm_ioremap_resource(&pdev->dev, res); + gpu->mmio = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(gpu->mmio)) return PTR_ERR(gpu->mmio); |