]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] isdn: fix-up schedule_timeout() usage
authorNishanth Aravamudan <nacc@us.ibm.com>
Mon, 7 Nov 2005 09:01:16 +0000 (01:01 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 7 Nov 2005 15:53:57 +0000 (07:53 -0800)
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>
drivers/isdn/i4l/isdn_tty.c
drivers/isdn/icn/icn.c
drivers/isdn/isdnloop/isdnloop.c
drivers/isdn/sc/init.c
drivers/isdn/sc/message.c

index b37ef1f06b3dffa55e36c313f7dd7238a1b6ceb0..356ee485be4bef8e9e33f19a16e74ef5aa0facf2 100644 (file)
@@ -1721,8 +1721,7 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
                 */
                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;
                }
index 386df71eee7473f0c7582c26331bdee63c623b68..6649f8bc99512247cdbfb6142dbfcce40f0669b0 100644 (file)
@@ -947,8 +947,7 @@ icn_loadproto(u_char __user * buffer, icn_card * card)
                                icn_maprelease_channel(card, 0);
                                return -EIO;
                        }
-                       set_current_state(TASK_INTERRUPTIBLE);
-                       schedule_timeout(10);
+                       schedule_timeout_interruptible(10);
                }
        }
        writeb(0x20, &sbuf_n);
index 14e1f8fbc61f05643dd4abcf3f4ee1ba4261981a..33d33970041173e54fe52cd25f21fe7e5275abf3 100644 (file)
@@ -1161,12 +1161,9 @@ isdnloop_command(isdn_ctrl * c, isdnloop_card * card)
                                        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
index 1ebed041672d0c3876c892c515e218997a58f38a..62b7acfad8a4fcd289b05735d1f51a21790c658e 100644 (file)
@@ -529,8 +529,7 @@ static int identify_board(unsigned long rambase, unsigned int iobase)
         */
        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) {
index ca204da3257d3918ae150c30d8b08a2e92bd35db..0a0fe6b8039bbe8cea80b815a1526799c31c8376 100644 (file)
@@ -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");