All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liviu Dudau <liviu.dudau@arm.com>
To: Cai Huoqing <caihuoqing@baidu.com>
Cc: brian.starkey@arm.com, airlied@linux.ie, daniel@ffwll.ch,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/arm/hdlcd: Make use of the helper function devm_platform_ioremap_resource()
Date: Wed, 1 Sep 2021 12:13:16 +0100	[thread overview]
Message-ID: <YS9gTBDhxK5kq+dD@e110455-lin.cambridge.arm.com> (raw)
In-Reply-To: <20210831074319.518-1-caihuoqing@baidu.com>

On Tue, Aug 31, 2021 at 03:43:19PM +0800, Cai Huoqing wrote:
> 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>

Acked-by: Liviu Dudau <liviu.dudau@arm.com>

Many thanks,
Liviu

> ---
>  drivers/gpu/drm/arm/hdlcd_drv.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
> index 479c2422a2e0..72e63c8fad4e 100644
> --- a/drivers/gpu/drm/arm/hdlcd_drv.c
> +++ b/drivers/gpu/drm/arm/hdlcd_drv.c
> @@ -129,7 +129,6 @@ static int hdlcd_load(struct drm_device *drm, unsigned long flags)
>  {
>  	struct hdlcd_drm_private *hdlcd = drm->dev_private;
>  	struct platform_device *pdev = to_platform_device(drm->dev);
> -	struct resource *res;
>  	u32 version;
>  	int ret;
>  
> @@ -144,8 +143,7 @@ static int hdlcd_load(struct drm_device *drm, unsigned long flags)
>  	atomic_set(&hdlcd->dma_end_count, 0);
>  #endif
>  
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	hdlcd->mmio = devm_ioremap_resource(drm->dev, res);
> +	hdlcd->mmio = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(hdlcd->mmio)) {
>  		DRM_ERROR("failed to map control registers area\n");
>  		ret = PTR_ERR(hdlcd->mmio);
> -- 
> 2.25.1
> 

-- 
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯

      reply	other threads:[~2021-09-01 11:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31  7:43 [PATCH] drm/arm/hdlcd: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-01 11:13 ` Liviu Dudau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YS9gTBDhxK5kq+dD@e110455-lin.cambridge.arm.com \
    --to=liviu.dudau@arm.com \
    --cc=airlied@linux.ie \
    --cc=brian.starkey@arm.com \
    --cc=caihuoqing@baidu.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.