Browse Source

drivers/char: use __set_current_state()

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>
Milind Arun Choudhary 18 years ago
parent
commit
cc0a8fbb7c

+ 2 - 2
drivers/char/amiserial.c

@@ -1574,7 +1574,7 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout)
 		if (timeout && time_after(jiffies, orig_jiffies + timeout))
 		if (timeout && time_after(jiffies, orig_jiffies + timeout))
 			break;
 			break;
 	}
 	}
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
 #ifdef SERIAL_DEBUG_RS_WAIT_UNTIL_SENT
 	printk("lsr = %d (jiff=%lu)...done\n", lsr, jiffies);
 	printk("lsr = %d (jiff=%lu)...done\n", lsr, jiffies);
 #endif
 #endif
@@ -1700,7 +1700,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
 #endif
 #endif
 		schedule();
 		schedule();
 	}
 	}
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(&info->open_wait, &wait);
 	remove_wait_queue(&info->open_wait, &wait);
 	if (extra_count)
 	if (extra_count)
 		state->count++;
 		state->count++;

+ 2 - 2
drivers/char/cyclades.c

@@ -2445,7 +2445,7 @@ block_til_ready(struct tty_struct *tty, struct file *filp,
 		base_addr = cinfo->base_addr;
 		base_addr = cinfo->base_addr;
 		firm_id = base_addr + ID_ADDRESS;
 		firm_id = base_addr + ID_ADDRESS;
 		if (!ISZLOADED(*cinfo)) {
 		if (!ISZLOADED(*cinfo)) {
-			current->state = TASK_RUNNING;
+			__set_current_state(TASK_RUNNING);
 			remove_wait_queue(&info->open_wait, &wait);
 			remove_wait_queue(&info->open_wait, &wait);
 			return -EINVAL;
 			return -EINVAL;
 		}
 		}
@@ -2498,7 +2498,7 @@ block_til_ready(struct tty_struct *tty, struct file *filp,
 			schedule();
 			schedule();
 		}
 		}
 	}
 	}
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(&info->open_wait, &wait);
 	remove_wait_queue(&info->open_wait, &wait);
 	if (!tty_hung_up_p(filp)) {
 	if (!tty_hung_up_p(filp)) {
 		info->count++;
 		info->count++;

+ 1 - 1
drivers/char/epca.c

@@ -949,7 +949,7 @@ static int block_til_ready(struct tty_struct *tty,
 
 
 	} /* End forever while  */
 	} /* End forever while  */
 
 
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(&ch->open_wait, &wait);
 	remove_wait_queue(&ch->open_wait, &wait);
 	if (!tty_hung_up_p(filp))
 	if (!tty_hung_up_p(filp))
 		ch->count++;
 		ch->count++;

+ 1 - 1
drivers/char/genrtc.c

@@ -207,7 +207,7 @@ static ssize_t gen_rtc_read(struct file *file, char __user *buf,
 			sizeof(unsigned long);
 			sizeof(unsigned long);
 	}
 	}
  out:
  out:
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(&gen_rtc_wait, &wait);
 	remove_wait_queue(&gen_rtc_wait, &wait);
 
 
 	return retval;
 	return retval;

+ 2 - 2
drivers/char/n_r3964.c

@@ -1088,13 +1088,13 @@ static ssize_t r3964_read(struct tty_struct *tty, struct file *file,
 			/* block until there is a message: */
 			/* block until there is a message: */
 			add_wait_queue(&pInfo->read_wait, &wait);
 			add_wait_queue(&pInfo->read_wait, &wait);
 repeat:
 repeat:
-			current->state = TASK_INTERRUPTIBLE;
+			__set_current_state(TASK_INTERRUPTIBLE);
 			pMsg = remove_msg(pInfo, pClient);
 			pMsg = remove_msg(pInfo, pClient);
 			if (!pMsg && !signal_pending(current)) {
 			if (!pMsg && !signal_pending(current)) {
 				schedule();
 				schedule();
 				goto repeat;
 				goto repeat;
 			}
 			}
-			current->state = TASK_RUNNING;
+			__set_current_state(TASK_RUNNING);
 			remove_wait_queue(&pInfo->read_wait, &wait);
 			remove_wait_queue(&pInfo->read_wait, &wait);
 		}
 		}
 
 

+ 1 - 1
drivers/char/riscom8.c

@@ -980,7 +980,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
 		}
 		}
 		schedule();
 		schedule();
 	}
 	}
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(&port->open_wait, &wait);
 	remove_wait_queue(&port->open_wait, &wait);
 	if (!tty_hung_up_p(filp))
 	if (!tty_hung_up_p(filp))
 		port->count++;
 		port->count++;

+ 2 - 2
drivers/char/rocket.c

@@ -943,7 +943,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
 #endif
 #endif
 		schedule();	/*  Don't hold spinlock here, will hang PC */
 		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);
 	remove_wait_queue(&info->open_wait, &wait);
 
 
 	spin_lock_irqsave(&info->slock, flags);
 	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))
 		if (signal_pending(current))
 			break;
 			break;
 	}
 	}
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 #ifdef ROCKET_DEBUG_WAIT_UNTIL_SENT
 #ifdef ROCKET_DEBUG_WAIT_UNTIL_SENT
 	printk(KERN_INFO "txcnt = %d (jiff=%lu)...done\n", txcnt, jiffies);
 	printk(KERN_INFO "txcnt = %d (jiff=%lu)...done\n", txcnt, jiffies);
 #endif
 #endif

+ 1 - 1
drivers/char/rtc.c

@@ -388,7 +388,7 @@ static ssize_t rtc_read(struct file *file, char __user *buf,
 	if (!retval)
 	if (!retval)
 		retval = count;
 		retval = count;
  out:
  out:
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(&rtc_wait, &wait);
 	remove_wait_queue(&rtc_wait, &wait);
 
 
 	return retval;
 	return retval;

+ 1 - 1
drivers/char/selection.c

@@ -299,7 +299,7 @@ int paste_selection(struct tty_struct *tty)
 		pasted += count;
 		pasted += count;
 	}
 	}
 	remove_wait_queue(&vc->paste_wait, &wait);
 	remove_wait_queue(&vc->paste_wait, &wait);
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 
 
 	tty_ldisc_deref(ld);
 	tty_ldisc_deref(ld);
 	return 0;
 	return 0;

+ 1 - 1
drivers/char/serial167.c

@@ -1892,7 +1892,7 @@ block_til_ready(struct tty_struct *tty, struct file *filp,
 #endif
 #endif
 		    schedule();
 		    schedule();
 	}
 	}
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(&info->open_wait, &wait);
 	remove_wait_queue(&info->open_wait, &wait);
 	if (!tty_hung_up_p(filp)) {
 	if (!tty_hung_up_p(filp)) {
 		info->count++;
 		info->count++;

+ 1 - 1
drivers/char/vt_ioctl.c

@@ -1061,7 +1061,7 @@ int vt_waitactive(int vt)
 		schedule();
 		schedule();
 	}
 	}
 	remove_wait_queue(&vt_activate_queue, &wait);
 	remove_wait_queue(&vt_activate_queue, &wait);
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	return retval;
 	return retval;
 }
 }