RE: [PATCH v4 14/22] usb: dwc2: host: register handle to the phy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Felipe Balbi [mailto:balbi@xxxxxx]
> Sent: Monday, April 27, 2015 10:43 PM
> To: Kaukab, Yousaf
> Cc: linux-usb@xxxxxxxxxxxxxxx; balbi@xxxxxx; john.youn@xxxxxxxxxxxx;
> Herrero, Gregory; r.baldyga@xxxxxxxxxxx;
> dinguyen@xxxxxxxxxxxxxxxxxxxxx; zhangfei.gao@xxxxxxxxxx;
> jwerner@xxxxxxxxxxxx; sergei.shtylyov@xxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v4 14/22] usb: dwc2: host: register handle to the phy
> 
> On Tue, Mar 24, 2015 at 10:01:02AM +0100, Mian Yousaf Kaukab wrote:
> > If phy driver is present register hcd handle to it.
> >
> > Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@xxxxxxxxx>
> > ---
> >  drivers/usb/dwc2/hcd.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index
> > 1cca5e0..919658e 100644
> > --- a/drivers/usb/dwc2/hcd.c
> > +++ b/drivers/usb/dwc2/hcd.c
> > @@ -2913,6 +2913,9 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg, int
> irq)
> >  	/* Don't support SG list at this point */
> >  	hcd->self.sg_tablesize = 0;
> >
> > +	if (!IS_ERR_OR_NULL(hsotg->uphy))
> 
> when is uphy NULL ? Aparently, only platform.c sets it to NULL in case of error,
> I'd say we should just make NULL a valid PHY pointer, then we can remove a
> bunch of these checks scattered around.

Here we can't as we want to dereference uphy.
However, I like the idea and I guess it entails a separate patch to fix where possible?

> 
> --
> balbi

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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux