[PATCH] drm/etnaviv: Use devm_platform_ioremap_resource()

Lucas Stach l.stach at pengutronix.de
Thu Jul 4 10:24:14 UTC 2019


Am Mittwoch, den 05.06.2019, 14:57 -0300 schrieb Fabio Estevam:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> 
> Signed-off-by: Fabio Estevam <festevam at gmail.com>

Thanks, applied.

Regards,
Lucas

> ---
>  drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> index 72d01e873160..a4ff1ee41bfa 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
> @@ -1711,7 +1711,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);
> @@ -1723,8 +1722,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);
>  


More information about the dri-devel mailing list