linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Prisk <linux@prisktech.co.nz>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 1/1] video: wm8505fb: Convert to devm_ioremap_resource()
Date: Mon, 08 Apr 2013 18:31:49 +0000	[thread overview]
Message-ID: <51630D15.3080209@prisktech.co.nz> (raw)
In-Reply-To: <1365415496-6825-1-git-send-email-sachin.kamat@linaro.org>

On 08/04/13 22:04, Sachin Kamat wrote:
> Use the newly introduced devm_ioremap_resource() instead of
> devm_request_and_ioremap() which provides more consistent error handling.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>   drivers/video/wm8505fb.c |    7 ++++---
>   1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/video/wm8505fb.c b/drivers/video/wm8505fb.c
> index 19e2e7f..01f9ace 100644
> --- a/drivers/video/wm8505fb.c
> +++ b/drivers/video/wm8505fb.c
> @@ -18,6 +18,7 @@
>   #include <linux/dma-mapping.h>
>   #include <linux/fb.h>
>   #include <linux/errno.h>
> +#include <linux/err.h>
>   #include <linux/init.h>
>   #include <linux/interrupt.h>
>   #include <linux/io.h>
> @@ -303,9 +304,9 @@ static int wm8505fb_probe(struct platform_device *pdev)
>   	fbi->fb.pseudo_palette	= addr;
>   
>   	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	fbi->regbase = devm_request_and_ioremap(&pdev->dev, res);
> -	if (fbi->regbase = NULL)
> -		return -EBUSY;
> +	fbi->regbase = devm_ioremap_resource(&pdev->dev, res);
> +	if (IS_ERR(fbi->regbase))
> +		return PTR_ERR(fbi->regbase);
>   
>   	disp_timing = of_get_display_timings(pdev->dev.of_node);
>   	if (!disp_timing)
Looks fine,

Acked-by: Tony Prisk <linux@prisktech.co.nz>

Regards
Tony P

  reply	other threads:[~2013-04-08 18:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08 10:16 [PATCH 1/1] video: wm8505fb: Convert to devm_ioremap_resource() Sachin Kamat
2013-04-08 18:31 ` Tony Prisk [this message]
2013-04-10  8:23 ` Tomi Valkeinen

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=51630D15.3080209@prisktech.co.nz \
    --to=linux@prisktech.co.nz \
    --cc=linux-fbdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).