From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2] net: mvneta: use devm_ioremap_resource() instead of of_iomap()
Date: Wed, 26 Mar 2014 05:42:11 -0300 [thread overview]
Message-ID: <20140326084211.GA941@arch.cereza> (raw)
In-Reply-To: <1395822600-30469-1-git-send-email-thomas.petazzoni@free-electrons.com>
Hi Thomas,
On Mar 26, Thomas Petazzoni wrote:
> @@ -2838,9 +2840,10 @@ static int mvneta_probe(struct platform_device *pdev)
>
> clk_prepare_enable(pp->clk);
>
> - pp->base = of_iomap(dn, 0);
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + pp->base = devm_ioremap_resource(&pdev->dev, res);
> if (pp->base == NULL) {
As per the comment above devm_ioremap_resource() definition, the usage is:
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base))
return PTR_ERR(base);
--
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
prev parent reply other threads:[~2014-03-26 8:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-26 8:30 [PATCHv2] net: mvneta: use devm_ioremap_resource() instead of of_iomap() Thomas Petazzoni
2014-03-26 8:42 ` Ezequiel Garcia [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=20140326084211.GA941@arch.cereza \
--to=ezequiel.garcia@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.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).