Commit 2abe301b authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Greg Kroah-Hartman

[PATCH] USB: Lock initializer cleanup - batch 4

Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent fba786ce
......@@ -30,7 +30,7 @@
#define MAX_USB_MINORS 256
static struct file_operations *usb_minors[MAX_USB_MINORS];
static spinlock_t minor_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(minor_lock);
static int usb_open(struct inode * inode, struct file * file)
{
......
......@@ -98,7 +98,7 @@ static struct usb_busmap busmap;
DECLARE_MUTEX (usb_bus_list_lock); /* exported only for usbfs */
/* used when updating hcd data */
static spinlock_t hcd_data_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(hcd_data_lock);
/* wait queue for synchronous unlinks */
DECLARE_WAIT_QUEUE_HEAD(usb_kill_urb_queue);
......
......@@ -39,10 +39,10 @@
/* Protect struct usb_device->state and ->children members
* Note: Both are also protected by ->serialize, except that ->state can
* change to USB_STATE_NOTATTACHED even when the semaphore isn't held. */
static spinlock_t device_state_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(device_state_lock);
/* khubd's worklist and its lock */
static spinlock_t hub_event_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(hub_event_lock);
static LIST_HEAD(hub_event_list); /* List of hubs needing servicing */
/* Wakes up khubd */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment