ChangeSet 1.1743.3.3, 2004/05/24 17:02:47-07:00, [EMAIL PROTECTED]

[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()


 drivers/usb/serial/kobil_sct.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)


diff -Nru a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
--- a/drivers/usb/serial/kobil_sct.c    Fri May 28 14:41:41 2004
+++ b/drivers/usb/serial/kobil_sct.c    Fri May 28 14:41:41 2004
@@ -474,14 +474,12 @@
                                );
 
                        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 @@
                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;



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id�66&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to