patch-2.3.16 linux/arch/m68k/mac/adb-bus.c

Next file: linux/arch/m68k/mac/config.c
Previous file: linux/arch/m68k/kernel/setup.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.15/linux/arch/m68k/mac/adb-bus.c linux/arch/m68k/mac/adb-bus.c
@@ -2334,8 +2334,8 @@
 	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) {
@@ -2349,7 +2349,7 @@
 		schedule();
 	}
 
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(&adb_wait, &wait);
 
 	return ret;
@@ -2562,8 +2562,8 @@
 	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) {
@@ -2577,7 +2577,7 @@
 		schedule();
 	}
 
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(&adb_wait, &wait);
 
 	return ret;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)