mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 05:11:48 +00:00
powerpc/adb: Use set_current_state()
Signed-off-by: majianpeng <majianpeng@gmail.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
54321242af
commit
64f8c13561
@ -710,7 +710,7 @@ static ssize_t adb_read(struct file *file, char __user *buf,
|
||||
req = NULL;
|
||||
spin_lock_irqsave(&state->lock, flags);
|
||||
add_wait_queue(&state->wait_queue, &wait);
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
|
||||
for (;;) {
|
||||
req = state->completed;
|
||||
@ -734,7 +734,7 @@ static ssize_t adb_read(struct file *file, char __user *buf,
|
||||
spin_lock_irqsave(&state->lock, flags);
|
||||
}
|
||||
|
||||
current->state = TASK_RUNNING;
|
||||
set_current_state(TASK_RUNNING);
|
||||
remove_wait_queue(&state->wait_queue, &wait);
|
||||
spin_unlock_irqrestore(&state->lock, flags);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user