Commit 662be4ac authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman

[PATCH] USB: yet another place for msleep

this is in kobil_sct.
It uses msleep() and replaces needless GFP_ATOMICs with GFP_NOIO
as this function can sleep.

  - no need for GFP_ATOMIC
  - use msleep()
parent 1a9461b6
......@@ -474,14 +474,12 @@ static int kobil_write (struct usb_serial_port *port, int from_user,
);
priv->cur_pos = priv->cur_pos + length;
result = usb_submit_urb( port->write_urb, GFP_ATOMIC );
result = usb_submit_urb( port->write_urb, GFP_NOIO );
dbg("%s - port %d Send write URB returns: %i", __FUNCTION__, port->number, result);
todo = priv->filled - priv->cur_pos;
if (todo > 0) {
//mdelay(16);
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(24 * HZ / 1000);
msleep(24);
}
} // end while
......@@ -493,7 +491,7 @@ static int kobil_write (struct usb_serial_port *port, int from_user,
port->interrupt_in_urb->dev = port->serial->dev;
// start reading
result = usb_submit_urb( port->interrupt_in_urb, GFP_ATOMIC );
result = usb_submit_urb( port->interrupt_in_urb, GFP_NOIO );
dbg("%s - port %d Send read URB returns: %i", __FUNCTION__, port->number, result);
}
return count;
......
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