patch-2.3.99-pre7 linux/drivers/usb/mousedev.c

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

diff -u --recursive --new-file v2.3.99-pre6/linux/drivers/usb/mousedev.c linux/drivers/usb/mousedev.c
@@ -418,10 +418,8 @@
 
 	mousedev->devfs = input_register_minor("mouse%d", minor, MOUSEDEV_MINOR_BASE);
 
-	if (mousedev_mix.open) {
+	if (mousedev_mix.open)
 		input_open_device(&mousedev->handle);
-		mousedev_mix.open++;
-	}
 
 	printk("mouse%d: PS/2 mouse device for input%d\n", minor, dev->number);
 
@@ -432,10 +430,8 @@
 {
 	struct mousedev *mousedev = handle->private;
 
-	if (mousedev->open || mousedev_mix.open) {
+	if (mousedev->open || mousedev_mix.open)
 		input_close_device(handle);
-		mousedev_mix.open--;
-	}
 
 	if (!--mousedev->used) {
 		input_unregister_minor(mousedev->devfs);

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