From: Thomas Gleixner Date: Tue, 7 Sep 2010 14:32:43 +0000 (+0000) Subject: usb: ftdi-elan: Convert "mutex" to semaphore X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5014b5e33a5485ab669ce536078c957ec221ade3;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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: Thomas Gleixner Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c index aecf380f6ec..c8eec9c2d89 100644 --- a/drivers/usb/misc/ftdi-elan.c +++ b/drivers/usb/misc/ftdi-elan.c @@ -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);