Skip to content

Commit

Permalink
powerpc/adb: Use set_current_state()
Browse files Browse the repository at this point in the history
Signed-off-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
majianpeng authored and ozbenh committed Feb 16, 2012
1 parent 5432124 commit 64f8c13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/macintosh/adb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

Expand Down

0 comments on commit 64f8c13

Please sign in to comment.