lkml.org 
[lkml]   [2009]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 17/58] opticon: Fix resume logic
    Date
    From: Alan Cox <alan@linux.intel.com>

    Opticon now takes the right mutex to check the port status but the status
    check is done wrongly for the modern serial code, so fix it.

    Signed-off-by: Alan Cox <alan@linux.intel.com>
    Cc: Alan Stern <stern@rowland.harvard.edu>
    Cc: Oliver Neukum <oliver@neukum.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
    ---
    drivers/usb/serial/opticon.c | 3 ++-
    1 files changed, 2 insertions(+), 1 deletions(-)

    diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c
    index c03fdc0..4cdb975 100644
    --- a/drivers/usb/serial/opticon.c
    +++ b/drivers/usb/serial/opticon.c
    @@ -502,7 +502,8 @@ static int opticon_resume(struct usb_interface *intf)
    int result;

    mutex_lock(&port->port.mutex);
    - if (port->port.count)
    + /* This is protected by the port mutex against close/open */
    + if (test_bit(ASYNCB_INITIALIZED, &port->port.flags))
    result = usb_submit_urb(priv->bulk_read_urb, GFP_NOIO);
    else
    result = 0;
    --
    1.6.5.5


    \
     
     \ /
      Last update: 2009-12-12 00:35    [W:0.020 / U:1.080 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site