ChangeSet 1.2020.1.15, 2005/03/07 22:21:24-08:00, [EMAIL PROTECTED]

[PATCH] usb/cypress_m8: replace schedule_timeout() with msleep()

Description: Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. The current code is not incorrect. Using msleep(), though,
encourages specifying time delays in human time-units and consistency across the
kernel.

Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>


 drivers/usb/serial/cypress_m8.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


diff -Nru a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
--- a/drivers/usb/serial/cypress_m8.c   2005-03-08 16:55:16 -08:00
+++ b/drivers/usb/serial/cypress_m8.c   2005-03-08 16:55:16 -08:00
@@ -57,9 +57,10 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/spinlock.h>
-#include <asm/uaccess.h>
 #include <linux/usb.h>
 #include <linux/serial.h>
+#include <linux/delay.h>
+#include <asm/uaccess.h>
 
 #include "usb-serial.h"
 #include "cypress_m8.h"
@@ -1013,8 +1014,7 @@
        cypress_serial_control(port, baud_mask, data_bits, stop_bits, 
parity_enable,
                               parity_type, 0, CYPRESS_SET_CONFIG);
 
-       set_current_state(TASK_INTERRUPTIBLE);
-       schedule_timeout(50*HZ/1000); /* give some time between change and read 
(50ms) */ 
+       msleep(50);                     /* give some time between change and 
read (50ms) */
 
        /* we perform a CYPRESS_GET_CONFIG so that the current settings are 
filled into the private structure
          * this should confirm that all is working if it returns what we just 
set */



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&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