patch-2.4.22 linux-2.4.22/drivers/usb/hub.c
Next file: linux-2.4.22/drivers/usb/kaweth.c
Previous file: linux-2.4.22/drivers/usb/host/usb-uhci.c
Back to the patch index
Back to the overall index
- Lines: 47
- Date:
2003-08-25 04:44:42.000000000 -0700
- Orig file:
linux-2.4.21/drivers/usb/hub.c
- Orig date:
2003-06-13 07:51:36.000000000 -0700
diff -urN linux-2.4.21/drivers/usb/hub.c linux-2.4.22/drivers/usb/hub.c
@@ -38,7 +38,7 @@
static LIST_HEAD(hub_list); /* List containing all of the hubs (for cleanup) */
static DECLARE_WAIT_QUEUE_HEAD(khubd_wait);
-static int khubd_pid = 0; /* PID of khubd */
+static pid_t khubd_pid = 0; /* PID of khubd */
static DECLARE_COMPLETION(khubd_exited);
#ifdef DEBUG
@@ -716,8 +716,6 @@
break;
}
- hub->children[port] = dev;
-
/* Reset the device */
if (usb_hub_port_reset(hub, port, dev, delay)) {
usb_free_dev(dev);
@@ -761,8 +759,10 @@
dev->bus->bus_name, dev->devpath, dev->devnum);
/* Run it through the hoops (find a driver, etc) */
- if (!usb_new_device(dev))
+ if (!usb_new_device(dev)) {
+ hub->children[port] = dev;
goto done;
+ }
/* Free the configuration if there was an error */
usb_free_dev(dev);
@@ -771,7 +771,6 @@
delay = HUB_LONG_RESET_TIME;
}
- hub->children[port] = NULL;
usb_hub_port_disable(hub, port);
done:
up(&usb_address0_sem);
@@ -949,7 +948,7 @@
*/
int usb_hub_init(void)
{
- int pid;
+ pid_t pid;
if (usb_register(&hub_driver) < 0) {
err("Unable to register USB hub driver");
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)