Skip to contentSkip to conversation

isdn/isdn_tty: replace

PATCH New Nishanth Aravamudan 1 participant 2 messages Sep 17, 2004 – Sep 27, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 14/16 isdn/isdn_tty: replace

Any comments would be appreciated. This is a re-push of a patch submitted a few months ago which has not been merged as of 2.6.9-rc1-mm5 / 2.6.9-rc2. Also, there will be one more patch than I expected (hence the total just went up by one in this series).

Description: Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected.

drivers/isdn/i4l/isdn_tty.c +2 -2
@@ -13,6 +13,7 @@
 
 #include <linux/config.h>
 #include <linux/isdn.h>
+#include <linux/delay.h>
 #include "isdn_common.h"
 #include "isdn_tty.h"
 #ifdef CONFIG_ISDN_AUDIO
@@ -1756,8 +1757,7 @@ isdn_tty_close(struct tty_struct *tty, s
 	tty->closing = 0;
 	module_put(info->owner);
 	if (info->blocked_open) {
-		set_current_state(TASK_INTERRUPTIBLE);
-		schedule_timeout(HZ/2);
+		msleep_interruptible(500);
 		wake_up_interruptible(&info->open_wait);
 	}
 	info->flags &= ~(ISDN_ASYNC_NORMAL_ACTIVE | ISDN_ASYNC_CLOSING);

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw

PATCH 14/16 scsi/sd: replace

Any comments would be appreciated.

Description: Use ssleep() instead of schedule_timeout() to guarantee the task delays as expected. Remove unused variable time1.

drivers/scsi/sd.c +2 -6
@@ -48,6 +48,7 @@
 #include <linux/blkdev.h>
 #include <linux/blkpg.h>
 #include <linux/kref.h>
+#include <linux/delay.h>
 #include <asm/uaccess.h>
 
 #include <scsi/scsi.h>
@@ -943,7 +944,6 @@ sd_spinup_disk(struct scsi_disk *sdkp, c
 		 * Issue command to spin up drive when not ready
 		 */
 		} else if (SRpnt->sr_sense_buffer[2] == NOT_READY) {
-			unsigned long time1;
 			if (!spintime) {
 				printk(KERN_NOTICE "%s: Spinning up disk...",
 				       diskname);
@@ -962,12 +962,8 @@ sd_spinup_disk(struct scsi_disk *sdkp, c
 				spintime_value = jiffies;
 			}
 			spintime = 1;
-			time1 = HZ;
 			/* Wait 1 second for next try */
-			do {
-				current->state = TASK_UNINTERRUPTIBLE;
-				time1 = schedule_timeout(time1);
-			} while(time1);
+			ssleep(1);
 			printk(".");
 		} else {
 			/* we don't understand the sense code, so it's

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors