Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Feb 2010 22:03:42 +0000 (14:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Feb 2010 22:03:42 +0000 (14:03 -0800)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: psmouse - make sure we don't schedule reconnects after cleanup

drivers/input/mouse/psmouse-base.c

index 9774bdf..d8c0c8d 100644 (file)
@@ -1141,7 +1141,14 @@ static void psmouse_cleanup(struct serio *serio)
                psmouse_deactivate(parent);
        }
 
-       psmouse_deactivate(psmouse);
+       psmouse_set_state(psmouse, PSMOUSE_INITIALIZING);
+
+       /*
+        * Disable stream mode so cleanup routine can proceed undisturbed.
+        */
+       if (ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_DISABLE))
+               printk(KERN_WARNING "psmouse.c: Failed to disable mouse on %s\n",
+                       psmouse->ps2dev.serio->phys);
 
        if (psmouse->cleanup)
                psmouse->cleanup(psmouse);