diff options
author | Kevin Cernekee <cernekee@gmail.com> | 2014-10-11 14:10:49 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-03 18:38:17 -0500 |
commit | 46f21949eb77a9dfc14a00071539929d11bcf69b (patch) | |
tree | c68bbb94283baf54451720149548be39da962be4 /drivers/usb/host/ohci-platform.c | |
parent | c4b8692a0520331a0ede604e20a0a52b96a98607 (diff) |
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 <cernekee@gmail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-platform.c')
-rw-r--r-- | drivers/usb/host/ohci-platform.c | 19 |
1 files 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 { | |||
43 | 43 | ||
44 | static const char hcd_name[] = "ohci-platform"; | 44 | static const char hcd_name[] = "ohci-platform"; |
45 | 45 | ||
46 | static int ohci_platform_reset(struct usb_hcd *hcd) | ||
47 | { | ||
48 | struct platform_device *pdev = to_platform_device(hcd->self.controller); | ||
49 | struct usb_ohci_pdata *pdata = dev_get_platdata(&pdev->dev); | ||
50 | struct ohci_hcd *ohci = hcd_to_ohci(hcd); | ||
51 | |||
52 | if (pdata->no_big_frame_no) | ||
53 | ohci->flags |= OHCI_QUIRK_FRAME_NO; | ||
54 | if (pdata->num_ports) | ||
55 | ohci->num_ports = pdata->num_ports; | ||
56 | |||
57 | return ohci_setup(hcd); | ||
58 | } | ||
59 | |||
60 | static int ohci_platform_power_on(struct platform_device *dev) | 46 | static int ohci_platform_power_on(struct platform_device *dev) |
61 | { | 47 | { |
62 | struct usb_hcd *hcd = platform_get_drvdata(dev); | 48 | struct usb_hcd *hcd = platform_get_drvdata(dev); |
@@ -110,7 +96,6 @@ static struct hc_driver __read_mostly ohci_platform_hc_driver; | |||
110 | 96 | ||
111 | static const struct ohci_driver_overrides platform_overrides __initconst = { | 97 | static const struct ohci_driver_overrides platform_overrides __initconst = { |
112 | .product_desc = "Generic Platform OHCI controller", | 98 | .product_desc = "Generic Platform OHCI controller", |
113 | .reset = ohci_platform_reset, | ||
114 | .extra_priv_size = sizeof(struct ohci_platform_priv), | 99 | .extra_priv_size = sizeof(struct ohci_platform_priv), |
115 | }; | 100 | }; |
116 | 101 | ||
@@ -218,6 +203,10 @@ static int ohci_platform_probe(struct platform_device *dev) | |||
218 | ohci->flags |= OHCI_QUIRK_BE_DESC; | 203 | ohci->flags |= OHCI_QUIRK_BE_DESC; |
219 | if (pdata->big_endian_mmio) | 204 | if (pdata->big_endian_mmio) |
220 | ohci->flags |= OHCI_QUIRK_BE_MMIO; | 205 | ohci->flags |= OHCI_QUIRK_BE_MMIO; |
206 | if (pdata->no_big_frame_no) | ||
207 | ohci->flags |= OHCI_QUIRK_FRAME_NO; | ||
208 | if (pdata->num_ports) | ||
209 | ohci->num_ports = pdata->num_ports; | ||
221 | 210 | ||
222 | #ifndef CONFIG_USB_OHCI_BIG_ENDIAN_MMIO | 211 | #ifndef CONFIG_USB_OHCI_BIG_ENDIAN_MMIO |
223 | if (ohci->flags & OHCI_QUIRK_BE_MMIO) { | 212 | if (ohci->flags & OHCI_QUIRK_BE_MMIO) { |