]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
usb: ftdi-elan: Convert "mutex" to semaphore
authorThomas Gleixner <tglx@linutronix.de>
Tue, 7 Sep 2010 14:32:43 +0000 (14:32 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 22 Oct 2010 17:21:31 +0000 (10:21 -0700)
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: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/misc/ftdi-elan.c

index aecf380f6ecc51abaae6fcb0bdd0cdf2e830d061..c8eec9c2d89ec0875f9396e5c31731d4499a5782 100644 (file)
@@ -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);