logo       

[Kernel-janitors] [PATCH] radio/miropcm20-rds: replace schedule_timeout() w: msg#00280

Subject: [Kernel-janitors] [PATCH] radio/miropcm20-rds: replace schedule_timeout() with msleep()
I would appreciate any comments from the janitors list.

Thanks,
Nish

Applys-to: 2.6.7

Description: Uses msleep() instead of schedule_timeout() so the task
is guaranteed to delay the desired time.

Signed-off-by: Nishanth Aravamudan <nacc@xxxxxxxxxx>


--- linux-vanilla/drivers/media/radio/miropcm20-rds.c   2004-06-16 
05:18:58.000000000 +0000
+++ linux-dev/drivers/media/radio/miropcm20-rds.c       2004-07-21 
17:21:33.000000000 +0000
@@ -14,6 +14,7 @@
 #include <linux/slab.h>
 #include <linux/fs.h>
 #include <linux/miscdevice.h>
+#include <linux/delay.h>
 #include <asm/uaccess.h>
 #include "miropcm20-rds-core.h"
 
@@ -60,8 +61,7 @@ static ssize_t rds_f_read(struct file *f
        char c;
        char bits[8];
 
-       current->state=TASK_UNINTERRUPTIBLE;
-       schedule_timeout(2*HZ);
+       msleep(2000);
        aci_rds_cmd(RDS_STATUS, &c, 1);
        print_matrix(&c, bits);
        if (copy_to_user(buffer, bits, 8))
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@xxxxxxxxxxxxxx
http://lists.osdl.org/mailman/listinfo/kernel-janitors
<Prev in Thread] Current Thread [Next in Thread>