From 9ad3d6ccf5eee285e233dbaf186369b8d477a666 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Thu, 17 Nov 2005 17:10:32 -0500 Subject: [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 Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/usb.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/usb/core/usb.h') diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 98e85fb4d3b..4647e1ebc68 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h @@ -16,9 +16,6 @@ extern int usb_get_device_descriptor(struct usb_device *dev, extern char *usb_cache_string(struct usb_device *udev, int index); extern int usb_set_configuration(struct usb_device *dev, int configuration); -extern void usb_lock_all_devices(void); -extern void usb_unlock_all_devices(void); - extern void usb_kick_khubd(struct usb_device *dev); extern void usb_suspend_root_hub(struct usb_device *hdev); extern void usb_resume_root_hub(struct usb_device *dev); -- cgit v1.2.3