aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-11-17 17:10:32 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-04 16:48:34 -0500
commit9ad3d6ccf5eee285e233dbaf186369b8d477a666 (patch)
tree4ad43518e01f1b2c6513e79b318d974979041b99 /drivers/usb/host
parent75318d2d7cab77b14c5d3dbd5e69f2680a769e16 (diff)
[PATCH] USB: Remove USB private semaphore
This patch (as605) removes the private udev->serialize semaphore, relying instead on the locking provided by the embedded struct device's semaphore. The changes are confined to the core, except that the usb_trylock_device routine now uses the return convention of down_trylock rather than down_read_trylock (they return opposite values for no good reason). A couple of other associated changes are included as well: Now that we aren't concerned about HCDs that avoid using the hcd glue layer, usb_disconnect no longer needs to acquire the usb_bus_lock -- that can be done by usb_remove_hcd where it belongs. Devices aren't locked over the same scope of code in usb_new_device and hub_port_connect_change as they used to be. This shouldn't cause any trouble. Along with the preceding driver core patch, this needs a lot of testing. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ohci-hub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index 72e3b12a1926..4b2226d77b34 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -372,7 +372,7 @@ done:
372 & ohci->hc_control) 372 & ohci->hc_control)
373 == OHCI_USB_OPER 373 == OHCI_USB_OPER
374 && time_after (jiffies, ohci->next_statechange) 374 && time_after (jiffies, ohci->next_statechange)
375 && usb_trylock_device (hcd->self.root_hub) 375 && usb_trylock_device (hcd->self.root_hub) == 0
376 ) { 376 ) {
377 ohci_vdbg (ohci, "autosuspend\n"); 377 ohci_vdbg (ohci, "autosuspend\n");
378 (void) ohci_bus_suspend (hcd); 378 (void) ohci_bus_suspend (hcd);