Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc0a8fbb authored by Milind Arun Choudhary's avatar Milind Arun Choudhary Committed by Linus Torvalds
Browse files

drivers/char: use __set_current_state()



use __set_current_state(TASK_*) instead of current->state = TASK_*,

Signed-off-by: default avatarMilind Arun Choudhary <milindchoudhary@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5ab2f7e0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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++;
+2 −2
Original line number Diff line number Diff line
@@ -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++;
+1 −1
Original line number Diff line number Diff line
@@ -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++;
+1 −1
Original line number Diff line number Diff line
@@ -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;
+2 −2
Original line number Diff line number Diff line
@@ -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);
		}

Loading