Commit 5014b5e3 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Greg Kroah-Hartman

usb: ftdi-elan: Convert "mutex" to semaphore

The "mutex" ftdi->sw_lock is used as a lock and a completion. Convert
it to a real semaphore which allows both.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a1df4e45
......@@ -2769,7 +2769,7 @@ static int ftdi_elan_probe(struct usb_interface *interface,
ftdi->sequence_num = ++ftdi_instances;
mutex_unlock(&ftdi_module_lock);
ftdi_elan_init_kref(ftdi);
init_MUTEX(&ftdi->sw_lock);
sema_init(&ftdi->sw_lock, 1);
ftdi->udev = usb_get_dev(interface_to_usbdev(interface));
ftdi->interface = interface;
mutex_init(&ftdi->u132_lock);
......
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