[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>
Showing
- drivers/usb/core/devices.c 2 additions, 2 deletionsdrivers/usb/core/devices.c
- drivers/usb/core/devio.c 0 additions, 2 deletionsdrivers/usb/core/devio.c
- drivers/usb/core/driver.c 0 additions, 4 deletionsdrivers/usb/core/driver.c
- drivers/usb/core/hcd.c 3 additions, 2 deletionsdrivers/usb/core/hcd.c
- drivers/usb/core/hub.c 18 additions, 30 deletionsdrivers/usb/core/hub.c
- drivers/usb/core/usb.c 9 additions, 105 deletionsdrivers/usb/core/usb.c
- drivers/usb/core/usb.h 0 additions, 3 deletionsdrivers/usb/core/usb.h
- drivers/usb/host/ohci-hub.c 1 addition, 1 deletiondrivers/usb/host/ohci-hub.c
- include/linux/usb.h 4 additions, 5 deletionsinclude/linux/usb.h
Loading
Please register or sign in to comment