[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1431002836-9711-2-git-send-email-ramneek.mehresh@freescale.com>
Date: Thu, 7 May 2015 18:17:08 +0530
From: Ramneek Mehresh <ramneek.mehresh@...escale.com>
To: <linux-kernel@...r.kernel.org>
CC: <balbi@...com>, <linux-usb@...r.kernel.org>,
<stern@...land.harvard.edu>, <gregkh@...uxfoundation.org>,
Ramneek Mehresh <ramneek.mehresh@...escale.com>
Subject: [PATCH 02/10] drivers:host:fsl: Use ehci_overrides structure for EHCI drv
Make use of ehci_driver_overrides structure for ehci-fsl
driver
Signed-off-by: Ramneek Mehresh <ramneek.mehresh@...escale.com>
---
drivers/usb/host/ehci-fsl.c | 55 +++++++++------------------------------------
1 file changed, 11 insertions(+), 44 deletions(-)
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index ab4eee3..1fe8ce7 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -636,60 +636,27 @@ static int ehci_start_port_reset(struct usb_hcd *hcd, unsigned port)
#define ehci_start_port_reset NULL
#endif /* CONFIG_USB_OTG */
+static struct hc_driver __read_mostly ehci_fsl_hc_driver;
-static const struct hc_driver ehci_fsl_hc_driver = {
- .description = hcd_name,
- .product_desc = "Freescale On-Chip EHCI Host Controller",
- .hcd_priv_size = sizeof(struct ehci_fsl),
-
- /*
- * generic hardware linkage
- */
- .irq = ehci_irq,
- .flags = HCD_USB2 | HCD_MEMORY | HCD_BH,
-
- /*
- * basic lifecycle operations
- */
+static struct ehci_driver_overrides ehci_fsl_overrides __initdata = {
+ .extra_priv_size = sizeof(struct ehci_fsl),
.reset = ehci_fsl_setup,
- .start = ehci_run,
- .stop = ehci_stop,
- .shutdown = ehci_shutdown,
-
- /*
- * managing i/o requests and associated device resources
- */
- .urb_enqueue = ehci_urb_enqueue,
- .urb_dequeue = ehci_urb_dequeue,
- .endpoint_disable = ehci_endpoint_disable,
- .endpoint_reset = ehci_endpoint_reset,
-
- /*
- * scheduling support
- */
- .get_frame_number = ehci_get_frame,
-
- /*
- * root hub support
- */
- .hub_status_data = ehci_hub_status_data,
- .hub_control = ehci_hub_control,
- .bus_suspend = ehci_bus_suspend,
- .bus_resume = ehci_bus_resume,
- .start_port_reset = ehci_start_port_reset,
- .relinquish_port = ehci_relinquish_port,
- .port_handed_over = ehci_port_handed_over,
-
- .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
};
static int ehci_fsl_drv_probe(struct platform_device *pdev)
{
+ struct hc_driver *driver = &ehci_fsl_hc_driver;
+
if (usb_disabled())
return -ENODEV;
+ ehci_init_driver(driver, &ehci_fsl_overrides);
+ driver->product_desc = "Freescale On-Chip EHCI Host Controller";
+ driver->start = ehci_run;
+ driver->start_port_reset = ehci_start_port_reset;
+
/* FIXME we only want one one probe() not two */
- return usb_hcd_fsl_probe(&ehci_fsl_hc_driver, pdev);
+ return usb_hcd_fsl_probe(driver, pdev);
}
static int ehci_fsl_drv_remove(struct platform_device *pdev)
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists