usb/cypress_m8: replace schedule_timeout() with
Subsystems (3)
PATCH 21/21 usb/cypress_m8: replace schedule_timeout() with
Hi,
Please consider applying.
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.
drivers/usb/serial/cypress_m8.c +3 -3
@@ -49,9 +49,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> #ifdef CONFIG_USB_SERIAL_DEBUG static int debug =1 ;
@@ -916,8 +917,7 @@ static void cypress_set_termios (structcypress_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 */
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Greg KH
AppliedRe: [KJ] [PATCH 21/21] usb/cypress_m8: replace schedule_timeout()
Quoted 10 lines · Nishanth Aravamudan
Hi,
Please consider applying.
Description: Use
msleep()instead ofschedule_timeout()to guarantee the task delays as expected. The current code is not incorrect. Usingmsleep(), though, encourages specifying time delays in human time-units and consistency across the kernel.Signed-off-by Nishanth Aravamudan <[email protected]>
Applied, thanks.
greg k-h
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors