From: gautam.vivek@samsung.com (Vivek Gautam)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/6] usb: host: ehci-tegra: Use devm_ioremap_resource instead of devm_ioremap
Date: Sun, 11 May 2014 20:14:00 +0530 [thread overview]
Message-ID: <CAFp+6iGSfhLB4J4Wr80WSih2bdzcO8vWhgZAonPv6SXbCp-Cmw@mail.gmail.com> (raw)
In-Reply-To: <536E814E.4020805@cogentembedded.com>
Hi,
On Sun, May 11, 2014 at 1:13 AM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Hello.
>
>
> On 05/10/2014 01:57 PM, Vivek Gautam wrote:
>
>> Using devm_ioremap_resource() API should actually be preferred over
>> devm_ioremap(), since the former request the mem region first and then
>> gives back the ioremap'ed memory pointer.
>> devm_ioremap_resource() calls request_mem_region(), therby preventing
>> other drivers to make any overlapping call to the same region.
>
>
>> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
>> ---
>> drivers/usb/host/ehci-tegra.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>
>> diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c
>> index 572634c..ccc6433 100644
>> --- a/drivers/usb/host/ehci-tegra.c
>> +++ b/drivers/usb/host/ehci-tegra.c
>> @@ -411,9 +411,8 @@ static int tegra_ehci_probe(struct platform_device
>> *pdev)
>> }
>> hcd->rsrc_start = res->start;
>> hcd->rsrc_len = resource_size(res);
>> - hcd->regs = devm_ioremap(&pdev->dev, res->start,
>> resource_size(res));
>> + hcd->regs = devm_ioremap_resource(&pdev->dev, res);
>> if (!hcd->regs) {
>
>
> This has to be changed as well as devm_ioremap_resource() returns error,
> not NULL.
Have already updated in the v2 version of this patch, and others in the series.
>
>
>> - dev_err(&pdev->dev, "Failed to remap I/O memory\n");
>> err = -ENOMEM;
>
>
> This needs to be changed as well, to pass up the error code
> devm_ioremap_resource() returned.
ditoo
--
Best Regards
Vivek Gautam
Samsung R&D Institute, Bangalore
India
next prev parent reply other threads:[~2014-05-11 14:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-10 9:56 [PATCH 0/6] usb: host: Cleanup for ioremap'ing hcd memory Vivek Gautam
2014-05-10 9:56 ` [PATCH 1/6] usb: host: ehci-exynos: Use devm_ioremap_resource instead of devm_ioremap Vivek Gautam
2014-05-10 10:06 ` Alexander Shiyan
2014-05-10 11:39 ` Vivek Gautam
2014-05-10 9:56 ` [PATCH 2/6] usb: host: ehci-msm: " Vivek Gautam
2014-05-10 9:57 ` [PATCH 3/6] usb: host: ehci-mv: " Vivek Gautam
2014-05-10 9:57 ` [PATCH 4/6] usb: host: ehci-spear: " Vivek Gautam
2014-05-10 9:57 ` [PATCH 5/6] usb: host: ehci-tegra: " Vivek Gautam
2014-05-10 19:43 ` Sergei Shtylyov
2014-05-11 14:44 ` Vivek Gautam [this message]
2014-05-10 9:57 ` [PATCH 6/6] usb: host: ohci-exynos: " Vivek Gautam
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=CAFp+6iGSfhLB4J4Wr80WSih2bdzcO8vWhgZAonPv6SXbCp-Cmw@mail.gmail.com \
--to=gautam.vivek@samsung.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).