[PATCH] USB HCDs: no longer need to register root hub

This patch changes the host controller drivers; they no longer need to
register their root hubs because usbcore will take care of it for them.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Alan Stern
2005-04-25 11:28:04 -04:00
committed by Greg Kroah-Hartman
父節點 8ec8d20b21
當前提交 247f310563
共有 6 個文件被更改,包括 4 次插入135 次删除

查看文件

@@ -562,7 +562,6 @@ static int uhci_start(struct usb_hcd *hcd)
int retval = -EBUSY;
int i;
dma_addr_t dma_handle;
struct usb_device *udev;
struct dentry *dentry;
hcd->uses_new_polling = 1;
@@ -626,14 +625,6 @@ static int uhci_start(struct usb_hcd *hcd)
goto err_create_qh_pool;
}
/* Initialize the root hub */
udev = usb_alloc_dev(NULL, &hcd->self, 0);
if (!udev) {
dev_err(uhci_dev(uhci), "unable to allocate root hub\n");
goto err_alloc_root_hub;
}
uhci->term_td = uhci_alloc_td(uhci);
if (!uhci->term_td) {
dev_err(uhci_dev(uhci), "unable to allocate terminating TD\n");
@@ -713,24 +704,11 @@ static int uhci_start(struct usb_hcd *hcd)
configure_hc(uhci);
start_rh(uhci);
udev->speed = USB_SPEED_FULL;
if (usb_hcd_register_root_hub(udev, hcd) != 0) {
dev_err(uhci_dev(uhci), "unable to start root hub\n");
retval = -ENOMEM;
goto err_start_root_hub;
}
return 0;
/*
* error exits:
*/
err_start_root_hub:
reset_hc(uhci);
del_timer_sync(&uhci->stall_timer);
err_alloc_skelqh:
for (i = 0; i < UHCI_NUM_SKELQH; i++)
if (uhci->skelqh[i]) {
@@ -742,9 +720,6 @@ err_alloc_skelqh:
uhci->term_td = NULL;
err_alloc_term_td:
usb_put_dev(udev);
err_alloc_root_hub:
dma_pool_destroy(uhci->qh_pool);
uhci->qh_pool = NULL;