[PATCH 11/12] USB: ehci-omap: Try to get PHY even if not in PHY mode
Alan Stern
stern at rowland.harvard.edu
Fri Mar 15 02:08:50 EST 2013
On Thu, 14 Mar 2013, Felipe Balbi wrote:
> > > if (IS_ERR(phy) || !phy) {
> > > + /* Don't bail out if PHY is not absolutely necessary */
> > > + if (pdata->port_mode[i] != OMAP_EHCI_PORT_MODE_PHY)
> > > + continue;
> > > +
> > > ret = IS_ERR(phy) ? PTR_ERR(phy) : -ENODEV;
> > > dev_err(dev, "Can't get PHY device for port %d: %d\n",
> > > i, ret);
> >
> > Felipe, this is a strange interface. Why do we sometimes get an
> > error-pointer and sometimes get just NULL? Why not always an
> > error-pointer?
>
> looks like we get NULL when PHY layer is disabled. Sounds like an
> oversight to me. Do you want to send a patch, or do I cook one and put
> yourself as Reported-by ?
You're more familiar with that code. "Reported-by" is good enough for
me. :-)
Alan Stern
More information about the devicetree-discuss
mailing list