patch-2.3.99-pre9 linux/drivers/usb/input.c

Next file: linux/drivers/usb/ov511.c
Previous file: linux/drivers/usb/hub.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre8/linux/drivers/usb/input.c linux/drivers/usb/input.c
@@ -244,6 +244,7 @@
 {
 	struct input_handle *handle = dev->handle;
 	struct input_dev **devptr = &input_dev;
+	struct input_handle *dnext;
 
 /*
  * Kill any pending repeat timers.
@@ -256,9 +257,10 @@
  */
 
 	while (handle) {
+		dnext = handle->dnext;
 		input_unlink_handle(handle);
 		handle->handler->disconnect(handle);
-		handle = handle->dnext;
+		handle = dnext;
 	}
 
 /*
@@ -309,15 +311,17 @@
 {
 	struct input_handler **handlerptr = &input_handler;
 	struct input_handle *handle = handler->handle;
+	struct input_handle *hnext;
 
 /*
  * Tell the handler to disconnect from all devices it keeps open.
  */
 
 	while (handle) {
+		hnext = handle->hnext;
 		input_unlink_handle(handle);
 		handler->disconnect(handle);
-		handle = handle->hnext;
+		handle = hnext;
 	}
 
 /*

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen (who was at: [email protected])