[PATCH 17/20] usb: xhci: export the hc_driver struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Most of the functions are common, the ->reset callback will likely be
overwritten. Therefore export it so the individual platform can copy it
and overwrite custom fields.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
---
 drivers/usb/host/xhci.c |    3 ++-
 drivers/usb/host/xhci.h |    2 ++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 96f2192..80bbc08 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -3214,7 +3214,7 @@ error:
 }
 EXPORT_SYMBOL_GPL(xhci_setup);
 
-static const struct hc_driver xhci_hc_driver = {
+const struct hc_driver xhci_hc_driver = {
 	.description		= "xhci-hcd",
 	.product_desc		= "xHCI Host Controller",
 	.hcd_priv_size		= sizeof(struct xhci_hcd *),
@@ -3256,6 +3256,7 @@ static const struct hc_driver xhci_hc_driver = {
 	.bus_suspend		= xhci_bus_suspend,
 	.bus_resume		= xhci_bus_resume,
 };
+EXPORT_SYMBOL_GPL(xhci_hc_driver);
 
 static int xhci_probe(struct platform_device *pdev)
 {
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index eec4178..c9b62fa 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -44,6 +44,7 @@ struct xhci_platform_data {
 	const struct hc_driver	*driver;
 	unsigned int		limit_active_eps;
 	unsigned int		quirks;
+	struct hc_driver	hc_driver;
 };
 
 #define DEFINE_XHCI_DATA(name)			\
@@ -1489,6 +1490,7 @@ void xhci_free_command(struct xhci_hcd *xhci,
 		struct xhci_command *command);
 
 /* xHCI host controller glue */
+extern const struct hc_driver xhci_hc_driver;
 void xhci_quiesce(struct xhci_hcd *xhci);
 int xhci_halt(struct xhci_hcd *xhci);
 int xhci_reset(struct xhci_hcd *xhci);
-- 
1.7.4.4

--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux