lkml.org 
[lkml]   [2009]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[Patch RFC 22/37] 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 <tglx@linutronix.de>
    Cc: Greg Kroah-Hartman <gregkh@suse.de>
    ---
    drivers/usb/misc/ftdi-elan.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    Index: linux-2.6-tip/drivers/usb/misc/ftdi-elan.c
    ===================================================================
    --- linux-2.6-tip.orig/drivers/usb/misc/ftdi-elan.c
    +++ linux-2.6-tip/drivers/usb/misc/ftdi-elan.c
    @@ -2766,7 +2766,7 @@ static int ftdi_elan_probe(struct usb_in
    ftdi->sequence_num = ++ftdi_instances;
    mutex_unlock(&ftdi_module_lock);
    ftdi_elan_init_kref(ftdi);
    - init_MUTEX(&ftdi->sw_lock);
    + semaphore_init(&ftdi->sw_lock);
    ftdi->udev = usb_get_dev(interface_to_usbdev(interface));
    ftdi->interface = interface;
    mutex_init(&ftdi->u132_lock);



    \
     
     \ /
      Last update: 2009-07-26 10:27    [W:0.035 / U:59.456 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site