From 46f21949eb77a9dfc14a00071539929d11bcf69b Mon Sep 17 00:00:00 2001 From: Kevin Cernekee Date: Sat, 11 Oct 2014 11:10:49 -0700 Subject: [PATCH] USB: ohci-platform: Move platform_data checks into the probe function This puts all of the platform_data checks in the same place, and removes the need for a custom drv->reset() callback. Signed-off-by: Kevin Cernekee Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ohci-platform.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c index 6fb03f88b51d..7793c3cfcf1f 100644 --- a/drivers/usb/host/ohci-platform.c +++ b/drivers/usb/host/ohci-platform.c @@ -43,20 +43,6 @@ struct ohci_platform_priv { static const char hcd_name[] = "ohci-platform"; -static int ohci_platform_reset(struct usb_hcd *hcd) -{ - struct platform_device *pdev = to_platform_device(hcd->self.controller); - struct usb_ohci_pdata *pdata = dev_get_platdata(&pdev->dev); - struct ohci_hcd *ohci = hcd_to_ohci(hcd); - - if (pdata->no_big_frame_no) - ohci->flags |= OHCI_QUIRK_FRAME_NO; - if (pdata->num_ports) - ohci->num_ports = pdata->num_ports; - - return ohci_setup(hcd); -} - static int ohci_platform_power_on(struct platform_device *dev) { struct usb_hcd *hcd = platform_get_drvdata(dev); @@ -110,7 +96,6 @@ static struct hc_driver __read_mostly ohci_platform_hc_driver; static const struct ohci_driver_overrides platform_overrides __initconst = { .product_desc = "Generic Platform OHCI controller", - .reset = ohci_platform_reset, .extra_priv_size = sizeof(struct ohci_platform_priv), }; @@ -218,6 +203,10 @@ static int ohci_platform_probe(struct platform_device *dev) ohci->flags |= OHCI_QUIRK_BE_DESC; if (pdata->big_endian_mmio) ohci->flags |= OHCI_QUIRK_BE_MMIO; + if (pdata->no_big_frame_no) + ohci->flags |= OHCI_QUIRK_FRAME_NO; + if (pdata->num_ports) + ohci->num_ports = pdata->num_ports; #ifndef CONFIG_USB_OHCI_BIG_ENDIAN_MMIO if (ohci->flags & OHCI_QUIRK_BE_MMIO) { -- 2.30.2