On Tue, 23 Jul 2013, Manjunath Goudar wrote: > Separate the OHCI pxa27x/pxa3xx host controller driver from > ohci-hcd host code so that it can be built as a separate driver > module. This work is part of enabling multi-platform kernels on > ARM. > > Signed-off-by: Manjunath Goudar <manjunath.goudar@xxxxxxxxxx> > Cc: Arnd Bergmann <arnd@xxxxxxxx> > Cc: Greg KH <greg@xxxxxxxxx> > Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> > Cc: linux-usb@xxxxxxxxxxxxxxx > > V2: > -Changed ohci_hcd and pxa27x_ohci struct variable names. > 1 ohci_hcd struct variable name is ohci. > 2 pxa27x_ohci struct variable name is pxa_ohci. There's a couple of small problems... > -struct pxa27x_ohci { > - /* must be 1st member here for hcd_to_ohci() to work */ > - struct ohci_hcd ohci; > +static const char hcd_name[] = "ohci-pxa27x"; > + > +static struct hc_driver __read_mostly ohci_pxa27x_hc_driver; > > - struct device *dev; > +struct pxa27x_ohci { > struct clk *clk; > void __iomem *mmio_base; > }; You didn't change the definition of to_pxa27x_ohci. > @@ -409,29 +421,31 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device > } > > /* initialize "struct pxa27x_ohci" */ > - ohci = (struct pxa27x_ohci *)hcd_to_ohci(hcd); > - ohci->dev = &pdev->dev; > - ohci->clk = usb_clk; > - ohci->mmio_base = (void __iomem *)hcd->regs; > + pxa_ohci = (struct pxa27x_ohci *)hcd_to_ohci(hcd); Use the to_pxa27x_ohci macro. > @@ -459,88 +473,18 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device > */ > void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *pdev) > { > - struct pxa27x_ohci *ohci = to_pxa27x_ohci(hcd); > + struct pxa27x_ohci *pxa_ohci = to_pxa27x_ohci(hcd); > > usb_remove_hcd(hcd); > - pxa27x_stop_hc(ohci, &pdev->dev); > + pxa27x_stop_hc(pxa_ohci, &pdev->dev); > iounmap(hcd->regs); > release_mem_region(hcd->rsrc_start, hcd->rsrc_len); > usb_put_hcd(hcd); > - clk_put(ohci->clk); ... > + clk_put(pxa_ohci->clk); This line must come before the usb_put_hcd(). Alan Stern -- 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