[PATCH] isdn: fix-up schedule_timeout() usage

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

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Nishanth Aravamudan 2005-11-07 01:01:16 -08:00 committed by Linus Torvalds
parent 4de4ebc6d8
commit 24763c48a3
5 changed files with 7 additions and 14 deletions

View file

@ -1721,8 +1721,7 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
*/ */
timeout = jiffies + HZ; timeout = jiffies + HZ;
while (!(info->lsr & UART_LSR_TEMT)) { while (!(info->lsr & UART_LSR_TEMT)) {
set_current_state(TASK_INTERRUPTIBLE); schedule_timeout_interruptible(20);
schedule_timeout(20);
if (time_after(jiffies,timeout)) if (time_after(jiffies,timeout))
break; break;
} }

View file

@ -947,8 +947,7 @@ icn_loadproto(u_char __user * buffer, icn_card * card)
icn_maprelease_channel(card, 0); icn_maprelease_channel(card, 0);
return -EIO; return -EIO;
} }
set_current_state(TASK_INTERRUPTIBLE); schedule_timeout_interruptible(10);
schedule_timeout(10);
} }
} }
writeb(0x20, &sbuf_n); writeb(0x20, &sbuf_n);

View file

@ -1161,12 +1161,9 @@ isdnloop_command(isdn_ctrl * c, isdnloop_card * card)
if (a) { if (a) {
if (!card->leased) { if (!card->leased) {
card->leased = 1; card->leased = 1;
while (card->ptype == ISDN_PTYPE_UNKNOWN) { while (card->ptype == ISDN_PTYPE_UNKNOWN)
set_current_state(TASK_INTERRUPTIBLE); schedule_timeout_interruptible(10);
schedule_timeout(10); schedule_timeout_interruptible(10);
}
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(10);
sprintf(cbuf, "00;FV2ON\n01;EAZ1\n02;EAZ2\n"); sprintf(cbuf, "00;FV2ON\n01;EAZ1\n02;EAZ2\n");
i = isdnloop_writecmd(cbuf, strlen(cbuf), 0, card); i = isdnloop_writecmd(cbuf, strlen(cbuf), 0, card);
printk(KERN_INFO printk(KERN_INFO

View file

@ -529,8 +529,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase)
*/ */
x = 0; x = 0;
while((inb(iobase + FIFOSTAT_OFFSET) & RF_HAS_DATA) && x < 100) { while((inb(iobase + FIFOSTAT_OFFSET) & RF_HAS_DATA) && x < 100) {
set_current_state(TASK_INTERRUPTIBLE); schedule_timeout_interruptible(1);
schedule_timeout(1);
x++; x++;
} }
if(x == 100) { if(x == 100) {

View file

@ -208,8 +208,7 @@ int send_and_receive(int card,
tries = 0; tries = 0;
/* wait for the response */ /* wait for the response */
while (tries < timeout) { while (tries < timeout) {
set_current_state(TASK_INTERRUPTIBLE); schedule_timeout_interruptible(1);
schedule_timeout(1);
pr_debug("SAR waiting..\n"); pr_debug("SAR waiting..\n");