From: peter.ujfalusi@ti.com (Peter Ujfalusi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/5] drivers: bus: omap_l3: Convert to use devm_request_and_ioremap()
Date: Tue, 4 Mar 2014 11:42:06 +0200 [thread overview]
Message-ID: <53159FEE.3030801@ti.com> (raw)
In-Reply-To: <1393925000.716948505@f148.i.mail.ru>
On 03/04/2014 11:23 AM, Alexander Shiyan wrote:
>>> - l3->l3_base[2] = ioremap(res->start, resource_size(res));
>>> - if (!l3->l3_base[2]) {
>>> - dev_err(&pdev->dev, "ioremap failed\n");
>>> - ret = -ENOMEM;
>>> - goto err2;
>>> + l3->l3_base[i] = devm_request_and_ioremap(&pdev->dev, res);
>>> + if (!l3->l3_base[i]) {
>>
>> if (IS_ERR(l3->l3_base[i]))
>
> Ahh, I messed up this with devm_ioremap_resource().
> However, if there is reason to use devm_request_and_ioremap() here?
devm_request_and_ioremap() is just a wrapper for devm_ioremap_resource(). It
returns NULL in case of error (eats up the error code at the same time).
I don't have strong preference on this so I can change it to
devm_ioremap_resource()
--
P?ter
next prev parent reply other threads:[~2014-03-04 9:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-04 9:01 [PATCH 0/5] drivers: bus: omap_l3: Conversion to devm_* Peter Ujfalusi
2014-03-04 9:01 ` [PATCH 1/5] drivers: bus: omap_l3: Convert to use devm_kzalloc Peter Ujfalusi
2014-03-04 9:07 ` Peter Ujfalusi
2014-03-04 9:01 ` [PATCH 2/5] drivers: bus: omap_l3: Convert to use devm_request_and_ioremap() Peter Ujfalusi
2014-03-04 9:12 ` Alexander Shiyan
2014-03-04 9:23 ` Alexander Shiyan
2014-03-04 9:42 ` Peter Ujfalusi [this message]
2014-03-04 9:42 ` Peter Ujfalusi
2014-03-04 10:50 ` Peter Ujfalusi
2014-03-04 9:01 ` [PATCH 3/5] drivers: bus: omap_l3: Convert to use devm_request_irq() Peter Ujfalusi
2014-03-04 9:01 ` [PATCH 4/5] drivers: bus: omap_l3: Remove the platform driver's remove function Peter Ujfalusi
2014-03-04 9:01 ` [PATCH 5/5] drivers: bus: omap_l3: Change pr_crit() to dev_err() when IRQ request fails Peter Ujfalusi
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=53159FEE.3030801@ti.com \
--to=peter.ujfalusi@ti.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).