From: Nishanth Aravamudan <[email-masked]>

Use schedule_timeout_interruptible() instead of
set_current_state()/schedule_timeout() to reduce kernel size.

(akpm: this patch relies on other stuff in -mm, please don't apply)

Signed-off-by: Nishanth Aravamudan <[email-masked]>
Cc: Karsten Keil <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 drivers/isdn/i4l/isdn_tty.c      |    3 +--
 drivers/isdn/icn/icn.c           |    3 +--
 drivers/isdn/isdnloop/isdnloop.c |    9 +++------
 drivers/isdn/sc/init.c           |    3 +--
 drivers/isdn/sc/message.c        |    3 +--
 5 files changed, 7 insertions(+), 14 deletions(-)

diff -puN drivers/isdn/i4l/isdn_tty.c~isdn-fix-up-schedule_timeout-usage drivers/isdn/i4l/isdn_tty.c
--- 25/drivers/isdn/i4l/isdn_tty.c~isdn-fix-up-schedule_timeout-usage	Wed Aug 17 17:00:54 2005
+++ 25-akpm/drivers/isdn/i4l/isdn_tty.c	Wed Aug 17 17:00:54 2005
@@ -1721,8 +1721,7 @@ isdn_tty_close(struct tty_struct *tty, s
 		 */
 		timeout = jiffies + HZ;
 		while (!(info->lsr & UART_LSR_TEMT)) {
-			set_current_state(TASK_INTERRUPTIBLE);
-			schedule_timeout(20);
+			schedule_timeout_interruptible(20);
 			if (time_after(jiffies,timeout))
 				break;
 		}
diff -puN drivers/isdn/icn/icn.c~isdn-fix-up-schedule_timeout-usage drivers/isdn/icn/icn.c
--- 25/drivers/isdn/icn/icn.c~isdn-fix-up-schedule_timeout-usage	Wed Aug 17 17:00:54 2005
+++ 25-akpm/drivers/isdn/icn/icn.c	Wed Aug 17 17:00:54 2005
@@ -947,8 +947,7 @@ icn_loadproto(u_char __user * buffer, ic
 				icn_maprelease_channel(card, 0);
 				return -EIO;
 			}
-			set_current_state(TASK_INTERRUPTIBLE);
-			schedule_timeout(10);
+			schedule_timeout_interruptible(10);
 		}
 	}
 	writeb(0x20, &sbuf_n);
diff -puN drivers/isdn/isdnloop/isdnloop.c~isdn-fix-up-schedule_timeout-usage drivers/isdn/isdnloop/isdnloop.c
--- 25/drivers/isdn/isdnloop/isdnloop.c~isdn-fix-up-schedule_timeout-usage	Wed Aug 17 17:00:54 2005
+++ 25-akpm/drivers/isdn/isdnloop/isdnloop.c	Wed Aug 17 17:00:54 2005
@@ -1161,12 +1161,9 @@ isdnloop_command(isdn_ctrl * c, isdnloop
 					if (a) {
 						if (!card->leased) {
 							card->leased = 1;
-							while (card->ptype == ISDN_PTYPE_UNKNOWN) {
-								set_current_state(TASK_INTERRUPTIBLE);
-								schedule_timeout(10);
-							}
-							set_current_state(TASK_INTERRUPTIBLE);
-							schedule_timeout(10);
+							while (card->ptype == ISDN_PTYPE_UNKNOWN)
+								schedule_timeout_interruptible(10);
+							schedule_timeout_interruptible(10);
 							sprintf(cbuf, "00;FV2ON\n01;EAZ1\n02;EAZ2\n");
 							i = isdnloop_writecmd(cbuf, strlen(cbuf), 0, card);
 							printk(KERN_INFO
diff -puN drivers/isdn/sc/init.c~isdn-fix-up-schedule_timeout-usage drivers/isdn/sc/init.c
--- 25/drivers/isdn/sc/init.c~isdn-fix-up-schedule_timeout-usage	Wed Aug 17 17:00:54 2005
+++ 25-akpm/drivers/isdn/sc/init.c	Wed Aug 17 17:00:54 2005
@@ -529,8 +529,7 @@ static int identify_board(unsigned long 
 	 */
 	x = 0;
 	while((inb(iobase + FIFOSTAT_OFFSET) & RF_HAS_DATA) && x < 100) {
-		set_current_state(TASK_INTERRUPTIBLE);
-		schedule_timeout(1);
+		schedule_timeout_interruptible(1);
 		x++;
 	}
 	if(x == 100) {
diff -puN drivers/isdn/sc/message.c~isdn-fix-up-schedule_timeout-usage drivers/isdn/sc/message.c
--- 25/drivers/isdn/sc/message.c~isdn-fix-up-schedule_timeout-usage	Wed Aug 17 17:00:54 2005
+++ 25-akpm/drivers/isdn/sc/message.c	Wed Aug 17 17:00:54 2005
@@ -208,8 +208,7 @@ int send_and_receive(int card,
 	tries = 0;
 	/* wait for the response */
 	while (tries < timeout) {
-		set_current_state(TASK_INTERRUPTIBLE);
-		schedule_timeout(1);
+		schedule_timeout_interruptible(1);
 		
 		pr_debug("SAR waiting..\n");
 
_