Re: [PATCH] usb: phy: Cleanup error code in **_usb_get_phy_**() APIs

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

 



>> I liked the ones where we had IS_ERR_OR_NULL() here (and in all the
>> ones below)... you sometimes have to handle PHYs in
>> platform-independent code where you don't want to worry about if this
>> platform actually has a PHY driver there or not. Any reason you
>> changed that?
>
> The **get_phy_*() APIs never return a NULL pointer now, do we still
> need to handle that in that case.
> Or are we assuming that code will use these phy operations without
> getting a phy in the first place ?

In our 5420 PHY tune patch (which I think has not made it upstream
yet), we're calling usb_phy_tune(hcd->phy) from the USB core. This
pointer is usually NULL unless it has been explicitly set by the
platform specific HCD driver. For situations like that I think it's
convenient if you can just fire-and-forget a generic PHY method
without worrying whether the particular PHY implements it or whether
it has a driver at all.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux