linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Prisk <linux@prisktech.co.nz>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: linux-serial@vger.kernel.org, gregkh@linuxfoundation.org,
	thierry.reding@avionic-design.de
Subject: Re: [PATCH 1/1] serial: vt8500_serial: Convert to devm_ioremap_resource()
Date: Tue, 05 Mar 2013 06:09:27 +1300	[thread overview]
Message-ID: <1362416967.24058.2.camel@gitbox> (raw)
In-Reply-To: <1362387279-31829-1-git-send-email-sachin.kamat@linaro.org>

On Mon, 2013-03-04 at 14:24 +0530, 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/tty/serial/vt8500_serial.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c
> index a3f9dd5..f15f53f 100644
> --- a/drivers/tty/serial/vt8500_serial.c
> +++ b/drivers/tty/serial/vt8500_serial.c
> @@ -35,6 +35,7 @@
>  #include <linux/clk.h>
>  #include <linux/platform_device.h>
>  #include <linux/of.h>
> +#include <linux/err.h>
>  
>  /*
>   * UART Register offsets
> @@ -585,9 +586,9 @@ static int vt8500_serial_probe(struct platform_device *pdev)
>  	if (!vt8500_port)
>  		return -ENOMEM;
>  
> -	vt8500_port->uart.membase = devm_request_and_ioremap(&pdev->dev, mmres);
> -	if (!vt8500_port->uart.membase)
> -		return -EADDRNOTAVAIL;
> +	vt8500_port->uart.membase = devm_ioremap_resource(&pdev->dev, mmres);
> +	if (IS_ERR(vt8500_port->uart.membase))
> +		return PTR_ERR(vt8500_port->uart.membase);
>  
>  	vt8500_port->clk = of_clk_get(pdev->dev.of_node, 0);
>  	if (IS_ERR(vt8500_port->clk)) {

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


      parent reply	other threads:[~2013-03-04 17:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-04  8:54 [PATCH 1/1] serial: vt8500_serial: Convert to devm_ioremap_resource() Sachin Kamat
2013-03-04  9:16 ` Thierry Reding
2013-03-04 17:09 ` Tony Prisk [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=1362416967.24058.2.camel@gitbox \
    --to=linux@prisktech.co.nz \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=sachin.kamat@linaro.org \
    --cc=thierry.reding@avionic-design.de \
    /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).