On Wed, Mar 19, 2014 at 10:06:28PM +0300, Sergei Shtylyov wrote:
> Hello.
> 
> On 03/19/2014 01:01 PM, Li Jun wrote:
> 
> >Init otg_port number of otg capable host to be 1 at host start.
> 
> >Signed-off-by: Li Jun <b47...@freescale.com>
> >---
> >  drivers/usb/chipidea/host.c |    7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> >diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
> >index 4b609bc..5ec8ccd 100644
> >--- a/drivers/usb/chipidea/host.c
> >+++ b/drivers/usb/chipidea/host.c
> >@@ -80,8 +80,13 @@ static int host_start(struct ci_hdrc *ci)
> >     ret = usb_add_hcd(hcd, 0, 0);
> >     if (ret)
> >             goto disable_reg;
> >-    else
> >+    else {
> 
>    All arms of the *if* statement should have {} if at least one arm
> has it -- see Documentation/CodingStyle.
> 
Good catch, I will update.

> >             ci->hcd = hcd;
> >+            if (ci_host_is_otg(ci)) {
> >+                    ci->transceiver->otg->host = &hcd->self;
> >+                    ci->transceiver->otg->host->otg_port = 1;
> 
>    Might be worth declaring a variable equal to 'ci->transceiver->otg' 
> first...
> 
Might be better, I will update too, thanks!

Li Jun
> >+            }
> >+    }
> 
> WBR, Sergei
> 
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to