From: "Alexander Shiyan" <shc_work@mail.ru>
To: "Vivek Gautam" <gautam.vivek@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org, swarren@wwwdotorg.org,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
kgene.kim@samsung.com, stern@rowland.harvard.edu,
linux-tegra@vger.kernel.org, thierry.reding@gmail.com,
linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH 1/6] usb: host: ehci-exynos: Use devm_ioremap_resource instead of devm_ioremap
Date: Sat, 10 May 2014 14:06:36 +0400 [thread overview]
Message-ID: <1399716396.580639659@f244.i.mail.ru> (raw)
In-Reply-To: <1399715823-19839-2-git-send-email-gautam.vivek@samsung.com>
Sat, 10 May 2014 15:26:58 +0530 от Vivek Gautam <gautam.vivek@samsung.com>:
> 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-exynos.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-exynos.c b/drivers/usb/host/ehci-exynos.c
> index 7f425ac..bccb6f1 100644
> --- a/drivers/usb/host/ehci-exynos.c
> +++ b/drivers/usb/host/ehci-exynos.c
> @@ -135,9 +135,8 @@ skip_phy:
>
> hcd->rsrc_start = res->start;
> hcd->rsrc_len = resource_size(res);
> - hcd->regs = devm_ioremap(&pdev->dev, res->start, hcd->rsrc_len);
> + hcd->regs = devm_ioremap_resource(&pdev->dev, res);
> if (!hcd->regs) {
> - dev_err(&pdev->dev, "Failed to remap I/O memory\n");
> err = -ENOMEM;
> goto fail_io;
> }
You should check this as:
if (IS_ERR(hcd->regs)) {
err = PTR_ERR(hcd->regs);
...
Same in other patches in this series.
---
next prev parent reply other threads:[~2014-05-10 10:06 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 [this message]
[not found] ` <1399716396.580639659-iE7NquU0hAtsdVUOrk1QfQ@public.gmane.org>
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
[not found] ` <1399715823-19839-1-git-send-email-gautam.vivek-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-05-10 9:57 ` [PATCH 5/6] usb: host: ehci-tegra: " Vivek Gautam
2014-05-10 19:43 ` Sergei Shtylyov
[not found] ` <536E814E.4020805-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2014-05-11 14:44 ` Vivek Gautam
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=1399716396.580639659@f244.i.mail.ru \
--to=shc_work@mail.ru \
--cc=gautam.vivek@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.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