On Thu, Sep 04, 2014 at 12:04:24PM -0700, Paul Zimmerman wrote: > From: Kamil Debski <k.debski@xxxxxxxxxxx> > > In the Generic PHY Framework a NULL phy is considered to be a valid phy > thus the "if (hsotg->phy)" check does not give us the information whether > the Generic PHY Framework is used. > > In addition to the above this patch also removes phy_init from probe and > phy_exit from remove. This is not necessary when init/exit is done in the > s3c_hsotg_phy_enable/disable functions. > > Signed-off-by: Kamil Debski <k.debski@xxxxxxxxxxx> > Signed-off-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> > Signed-off-by: Robert Baldyga <r.baldyga@xxxxxxxxxxx> > Signed-off-by: Paul Zimmerman <paulz@xxxxxxxxxxxx> this too, looks like it deserves Cc: stable FWIW Reviewed-by: Felipe Balbi <balbi@xxxxxx> > --- > drivers/usb/dwc2/gadget.c | 27 ++++++++++++--------------- > 1 file changed, 12 insertions(+), 15 deletions(-) > > diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c > index 505d56e..fd556e0 100644 > --- a/drivers/usb/dwc2/gadget.c > +++ b/drivers/usb/dwc2/gadget.c > @@ -2747,13 +2747,14 @@ static void s3c_hsotg_phy_enable(struct s3c_hsotg *hsotg) > > dev_dbg(hsotg->dev, "pdev 0x%p\n", pdev); > > - if (hsotg->phy) { > - phy_init(hsotg->phy); > - phy_power_on(hsotg->phy); > - } else if (hsotg->uphy) > + if (hsotg->uphy) > usb_phy_init(hsotg->uphy); > - else if (hsotg->plat->phy_init) > + else if (hsotg->plat && hsotg->plat->phy_init) > hsotg->plat->phy_init(pdev, hsotg->plat->phy_type); > + else { > + phy_init(hsotg->phy); > + phy_power_on(hsotg->phy); > + } coding style, placement of braces. -- balbi
Attachment:
signature.asc
Description: Digital signature