From: "Ivan T. Ivanov" <iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
To: balbi-l0cyMroinI0@public.gmane.org
Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 2/7] usb: phy: msm: Migrate to Managed Device Resource allocation
Date: Thu, 25 Jul 2013 16:42:20 +0300 [thread overview]
Message-ID: <1374759740.1956.30.camel@iivanov-dev.int.mm-sol.com> (raw)
In-Reply-To: <20130724123822.GH17962@radagast>
Hi,
On Wed, 2013-07-24 at 15:38 +0300, Felipe Balbi wrote:
> Hi,
>
> On Tue, Jul 09, 2013 at 06:47:08PM +0300, Ivan T. Ivanov wrote:
> > From: "Ivan T. Ivanov" <iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
> >
> > Use managed device resources to clean up the probe/remove
> > and get DT support for free.
> >
> > Signed-off-by: Ivan T. Ivanov <iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
> > ---
> > drivers/usb/phy/phy-msm-usb.c | 78 +++++++++++------------------------------
> > 1 file changed, 20 insertions(+), 58 deletions(-)
> >
> > diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
> > index ab1b880..cc37f5e 100644
> > --- a/drivers/usb/phy/phy-msm-usb.c
> > +++ b/drivers/usb/phy/phy-msm-usb.c
> > @@ -1458,30 +1455,27 @@ static int __init msm_otg_probe(struct platform_device *pdev)
> > * clock is introduced to remove the dependency on AXI
> > * bus frequency.
> > */
> > - motg->core_clk = clk_get(&pdev->dev, "usb_hs_core_clk");
> > + motg->core_clk = devm_clk_get(&pdev->dev, "usb_hs_core_clk");
> > if (IS_ERR(motg->core_clk))
> > motg->core_clk = NULL;
> >
> > res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > if (!res) {
>
> no need to check for the resource when using devm_ioremap_resource()
>
> > dev_err(&pdev->dev, "failed to get platform resource mem\n");
> > - ret = -ENODEV;
> > - goto put_core_clk;
> > + return -ENODEV;
> > }
> >
> > - motg->regs = ioremap(res->start, resource_size(res));
> > + motg->regs = devm_ioremap_resource(&pdev->dev, res);
> > if (!motg->regs) {
> > dev_err(&pdev->dev, "ioremap failed\n");
>
> don't print error messages when using devm_ioremap_resource()
Will fix these places and re-send,
Thank you,
Ivan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-07-25 13:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-09 15:47 [PATCH v2 0/7] usb: phy: msm: Fixes and cleanups Ivan T. Ivanov
2013-07-09 15:47 ` [PATCH v2 1/7] usb: phy: msm: Move mach depndend code to platform data Ivan T. Ivanov
2013-07-24 12:34 ` Felipe Balbi
2013-07-24 12:36 ` Felipe Balbi
[not found] ` <1373384833-18077-1-git-send-email-iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2013-07-09 15:47 ` [PATCH v2 2/7] usb: phy: msm: Migrate to Managed Device Resource allocation Ivan T. Ivanov
[not found] ` <1373384833-18077-3-git-send-email-iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2013-07-24 12:38 ` Felipe Balbi
2013-07-25 13:42 ` Ivan T. Ivanov [this message]
2013-07-09 15:47 ` [PATCH v2 6/7] usb: phy: msm: Fix WARNING: Prefer seq_puts to seq_printf Ivan T. Ivanov
2013-07-16 11:25 ` [PATCH v2 0/7] usb: phy: msm: Fixes and cleanups Ivan T. Ivanov
2013-07-09 15:47 ` [PATCH v2 3/7] usb: phy: msm: Move regulator usage to managed resource allocation Ivan T. Ivanov
2013-07-24 12:39 ` Felipe Balbi
2013-07-25 13:43 ` Ivan T. Ivanov
2013-07-26 12:31 ` Ivan T. Ivanov
2013-07-26 20:28 ` Felipe Balbi
2013-07-27 6:54 ` Ivan T. Ivanov
2013-07-09 15:47 ` [PATCH v2 4/7] usb: phy: msm: Remove unnecessarily check for valid regulators Ivan T. Ivanov
2013-07-09 15:47 ` [PATCH v2 5/7] usb: phy: msm: Fix WARNING: quoted string split across lines Ivan T. Ivanov
2013-07-09 15:47 ` [PATCH v2 7/7] usb: phy: msm: Lindent the code Ivan T. Ivanov
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=1374759740.1956.30.camel@iivanov-dev.int.mm-sol.com \
--to=iivanov-neyub+7iv8pqt0dzr+alfa@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).