summaryrefslogtreecommitdiffstats
path: root/arch/m68k/mac/adb-bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/mac/adb-bus.c')
-rw-r--r--arch/m68k/mac/adb-bus.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/m68k/mac/adb-bus.c b/arch/m68k/mac/adb-bus.c
index 5f0f792aa..850e9cb6f 100644
--- a/arch/m68k/mac/adb-bus.c
+++ b/arch/m68k/mac/adb-bus.c
@@ -13,7 +13,6 @@
* MSch (1/98) Integrated start of IIsi driver by Robert Thompson
*/
-#include <stdarg.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/miscdevice.h>
@@ -2335,8 +2334,8 @@ static int adb_wait_reply(struct adbdev_state *state, struct file *file)
int ret = 0;
DECLARE_WAITQUEUE(wait,current);
+ __set_current_state(TASK_INTERRUPTIBLE);
add_wait_queue(&adb_wait, &wait);
- current->state = TASK_INTERRUPTIBLE;
while (!state->req.got_reply) {
if (file->f_flags & O_NONBLOCK) {
@@ -2350,7 +2349,7 @@ static int adb_wait_reply(struct adbdev_state *state, struct file *file)
schedule();
}
- current->state = TASK_RUNNING;
+ __set_current_state(TASK_RUNNING);
remove_wait_queue(&adb_wait, &wait);
return ret;
@@ -2563,8 +2562,8 @@ static int adb_wait_reply(struct adbdev_state *state, struct file *file)
printk("ADB request: wait_reply (blocking ... \n");
#endif
+ __set_current_state(TASK_INTERRUPTIBLE);
add_wait_queue(&adb_wait, &wait);
- current->state = TASK_INTERRUPTIBLE;
while (!state->req.got_reply) {
if (file->f_flags & O_NONBLOCK) {
@@ -2578,7 +2577,7 @@ static int adb_wait_reply(struct adbdev_state *state, struct file *file)
schedule();
}
- current->state = TASK_RUNNING;
+ __set_current_state(TASK_RUNNING);
remove_wait_queue(&adb_wait, &wait);
return ret;