drivers/char: use __set_current_state()
authorMilind Arun Choudhary <milindchoudhary@gmail.com>
Tue, 8 May 2007 07:30:52 +0000 (00:30 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 8 May 2007 18:15:13 +0000 (11:15 -0700)
use __set_current_state(TASK_*) instead of current->state = TASK_*,

Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/amiserial.c
drivers/char/cyclades.c
drivers/char/epca.c
drivers/char/genrtc.c
drivers/char/n_r3964.c
drivers/char/riscom8.c
drivers/char/rocket.c
drivers/char/rtc.c
drivers/char/selection.c
drivers/char/serial167.c
drivers/char/vt_ioctl.c

index 0e2b72f2b8871d96f124581bba1ee724c2f936c0..4eaceabd8cea6c09818f527c9816c24e1f29f3c3 100644 (file)
@@ -1574,7 +1574,7 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout)
                if (timeout && time_after(jiffies, orig_jiffies + timeout))
                        break;
        }
-       current->state = TASK_RUNNING;
+       __set_current_state(TASK_RUNNING);
 #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
        printk("lsr = %d (jiff=%lu)...done\n", lsr, jiffies);
 #endif
@@ -1700,7 +1700,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
 #endif
                schedule();
        }
-       current->state = TASK_RUNNING;
+       __set_current_state(TASK_RUNNING);
        remove_wait_queue(&info->open_wait, &wait);
        if (extra_count)
                state->count++;
index 29b5375feeba8c677cc39a27dcc49174cf8809e8..ff63ee1d6065fdb32abd686849f4d5cf7b1f7cac 100644 (file)
@@ -2445,7 +2445,7 @@ block_til_ready(struct tty_struct *tty, struct file *filp,
                base_addr = cinfo->base_addr;
                firm_id = base_addr + ID_ADDRESS;
                if (!ISZLOADED(*cinfo)) {
-                       current->state = TASK_RUNNING;
+                       __set_current_state(TASK_RUNNING);
                        remove_wait_queue(&info->open_wait, &wait);
                        return -EINVAL;
                }
@@ -2498,7 +2498,7 @@ block_til_ready(struct tty_struct *tty, struct file *filp,
                        schedule();
                }
        }
-       current->state = TASK_RUNNING;
+       __set_current_state(TASK_RUNNING);
        remove_wait_queue(&info->open_wait, &wait);
        if (!tty_hung_up_p(filp)) {
                info->count++;
index de5be30484ad3d9f8b91b8f0699ca39c97647d99..c6c56fb8ba5098f341692d16c698e39a383abda1 100644 (file)
@@ -949,7 +949,7 @@ static int block_til_ready(struct tty_struct *tty,
 
        } /* End forever while  */
 
-       current->state = TASK_RUNNING;
+       __set_current_state(TASK_RUNNING);
        remove_wait_queue(&ch->open_wait, &wait);
        if (!tty_hung_up_p(filp))
                ch->count++;
index 23b25ada65ea3c5b02405b1cf955afd17051d5f1..49f914e7921636c96bd363c9b95fcc1fb307257d 100644 (file)
@@ -207,7 +207,7 @@ static ssize_t gen_rtc_read(struct file *file, char __user *buf,
                        sizeof(unsigned long);
        }
  out:
-       current->state = TASK_RUNNING;
+       __set_current_state(TASK_RUNNING);
        remove_wait_queue(&gen_rtc_wait, &wait);
 
        return retval;
index 65f2d3a96b85dd80e9400e9c730482596f009e9f..14557a4822c0354047b804a2287846a725297955 100644 (file)
@@ -1088,13 +1088,13 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
                        /* block until there is a message: */
                        add_wait_queue(&pInfo->read_wait, &wait);
 repeat:
-                       current->state = TASK_INTERRUPTIBLE;
+                       __set_current_state(TASK_INTERRUPTIBLE);
                        pMsg = remove_msg(pInfo, pClient);
                        if (!pMsg && !signal_pending(current)) {
                                schedule();
                                goto repeat;
                        }
-                       current->state = TASK_RUNNING;
+                       __set_current_state(TASK_RUNNING);
                        remove_wait_queue(&pInfo->read_wait, &wait);
                }
 
index 70145254fb9dff9af8acedcc169f791acdc00446..3494e3fc44bfb49f0886fe13d45324547eff8f7d 100644 (file)
@@ -980,7 +980,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
                }
                schedule();
        }
-       current->state = TASK_RUNNING;
+       __set_current_state(TASK_RUNNING);
        remove_wait_queue(&port->open_wait, &wait);
        if (!tty_hung_up_p(filp))
                port->count++;
index aa4cc12bbcb1355d227ca3bd1edc087a3d37fa1d..e249d8cfcd06ce68c283fabb11a13618764373ae 100644 (file)
@@ -943,7 +943,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
 #endif
                schedule();     /*  Don't hold spinlock here, will hang PC */
        }
-       current->state = TASK_RUNNING;
+       __set_current_state(TASK_RUNNING);
        remove_wait_queue(&info->open_wait, &wait);
 
        spin_lock_irqsave(&info->slock, flags);
@@ -1598,7 +1598,7 @@ static void rp_wait_until_sent(struct tty_struct *tty, int timeout)
                if (signal_pending(current))
                        break;
        }
-       current->state = TASK_RUNNING;
+       __set_current_state(TASK_RUNNING);
 #ifdef ROCKET_DEBUG_WAIT_UNTIL_SENT
        printk(KERN_INFO "txcnt = %d (jiff=%lu)...done\n", txcnt, jiffies);
 #endif
index c7dac9b13351d2585aa6e911f7bf873cd89c0547..20380a2c4dee400c877a44bdc92010b467130c7d 100644 (file)
@@ -388,7 +388,7 @@ static ssize_t rtc_read(struct file *file, char __user *buf,
        if (!retval)
                retval = count;
  out:
-       current->state = TASK_RUNNING;
+       __set_current_state(TASK_RUNNING);
        remove_wait_queue(&rtc_wait, &wait);
 
        return retval;
index 74cff839c8572c9bf560640b0ea513938627fd54..a69f094d1ed3d8778d6c05506a346e1a56280f04 100644 (file)
@@ -299,7 +299,7 @@ int paste_selection(struct tty_struct *tty)
                pasted += count;
        }
        remove_wait_queue(&vc->paste_wait, &wait);
-       current->state = TASK_RUNNING;
+       __set_current_state(TASK_RUNNING);
 
        tty_ldisc_deref(ld);
        return 0;
index 5fd314adc1f28d864805bea180d2f87a77d06741..c585b4738f86c2b670a46e54c4b5a154a2c5ed5d 100644 (file)
@@ -1892,7 +1892,7 @@ block_til_ready(struct tty_struct *tty, struct file *filp,
 #endif
                    schedule();
        }
-       current->state = TASK_RUNNING;
+       __set_current_state(TASK_RUNNING);
        remove_wait_queue(&info->open_wait, &wait);
        if (!tty_hung_up_p(filp)) {
                info->count++;
index c9f2dd620e877391373034eba491fb0789a2c425..c6f6f42097391b20f434a669ae6b0f263fda63ee 100644 (file)
@@ -1061,7 +1061,7 @@ int vt_waitactive(int vt)
                schedule();
        }
        remove_wait_queue(&vt_activate_queue, &wait);
-       current->state = TASK_RUNNING;
+       __set_current_state(TASK_RUNNING);
        return retval;
 }