@@ -36,6 +36,7 @@
#include <linux/phy/phy.h>
#include <linux/usb.h>
#include <linux/usb/hcd.h>
+#include <linux/usb/onboard_hub.h>
#include <linux/usb/otg.h>
#include "usb.h"
@@ -2963,6 +2964,9 @@ int usb_add_hcd(struct usb_hcd *hcd,
if (hcd->uses_new_polling && HCD_POLL_RH(hcd))
usb_hcd_poll_rh_status(hcd);
+ if (usb_hcd_is_primary_hcd(hcd))
+ onboard_hub_create_pdevs(hcd->self.root_hub, &hcd->onboard_hub_devs);
+
return retval;
err_register_root_hub:
@@ -3041,6 +3045,8 @@ void usb_remove_hcd(struct usb_hcd *hcd)
if (usb_hcd_is_primary_hcd(hcd)) {
if (hcd->irq > 0)
free_irq(hcd->irq, hcd);
+
+ onboard_hub_destroy_pdevs(&hcd->onboard_hub_devs);
}
usb_deregister_bus(&hcd->self);
@@ -198,6 +198,7 @@ struct usb_hcd {
struct usb_hcd *shared_hcd;
struct usb_hcd *primary_hcd;
+ struct list_head onboard_hub_devs;
#define HCD_BUFFER_POOLS 4
struct dma_pool *pool[HCD_BUFFER_POOLS];