netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Larsson <andreas@gaisler.com>
To: Laurent Navet <laurent.navet@gmail.com>
Cc: wg@grandegger.com, mkl@pengutronix.de, linux-can@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers: net: can: grcan: use devm_ioremap_resource()
Date: Tue, 14 May 2013 10:49:32 +0200	[thread overview]
Message-ID: <5191FA9C.50200@gaisler.com> (raw)
In-Reply-To: <1368458871-7402-1-git-send-email-laurent.navet@gmail.com>

On 2013-05-13 17:27, Laurent Navet wrote:
> Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.
> dev_err() message is no more needed since it's already displayed in
> devm_ioremap_resource().
>
> Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
> ---
>   drivers/net/can/grcan.c |    7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/can/grcan.c b/drivers/net/can/grcan.c
> index 17fbc7a..9e9d0d6 100644
> --- a/drivers/net/can/grcan.c
> +++ b/drivers/net/can/grcan.c
> @@ -1683,10 +1683,9 @@ static int grcan_probe(struct platform_device *ofdev)
>   	}
>
>   	res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
> -	base = devm_request_and_ioremap(&ofdev->dev, res);
> -	if (!base) {
> -		dev_err(&ofdev->dev, "couldn't map IO resource\n");
> -		err = -EADDRNOTAVAIL;
> +	base = devm_ioremap_resource(&ofdev->dev, res);
> +	if (IS_ERR(base)) {
> +		err = PTR_ERR(base);
>   		goto exit_error;
>   	}

Acked-by: Andreas Larsson <andreas@gaisler.com>


  reply	other threads:[~2013-05-14  8:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-13 15:27 [PATCH] drivers: net: can: grcan: use devm_ioremap_resource() Laurent Navet
2013-05-14  8:49 ` Andreas Larsson [this message]
2013-05-15  9:12 ` Marc Kleine-Budde

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=5191FA9C.50200@gaisler.com \
    --to=andreas@gaisler.com \
    --cc=laurent.navet@gmail.com \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=wg@grandegger.com \
    /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).