Do a full reset upon mode switch failure
Andres Salomon
dilinger at debian.unroutableorg
Wed Jan 3 03:36:24 EST 2007
Commit: 0aa072b64c717f9aa542786443f2e925b7276df8
Parent: a4eb5a153fa345c350ab345003e205c6f8511e24
commit 0aa072b64c717f9aa542786443f2e925b7276df8
Author: Andres Salomon <dilinger at debian.org>
AuthorDate: Wed Dec 27 15:55:46 2006 -0500
Commit: Andres Salomon <dilinger at debian.org>
CommitDate: Wed Dec 27 15:55:46 2006 -0500
Do a full reset upon mode switch failure
Use olpc_reconnect() to do a full reset of the device if the mode switch
should fail. It shouldn't fail, but just in case...
Signed-off-by: Andres Salomon <dilinger at debian.org>
---
drivers/input/mouse/olpc.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/input/mouse/olpc.c b/drivers/input/mouse/olpc.c
index 4e064a2..932d81a 100644
--- a/drivers/input/mouse/olpc.c
+++ b/drivers/input/mouse/olpc.c
@@ -383,7 +383,8 @@ static void olpc_mode_switch(void *p)
return;
bad:
- printk(KERN_WARNING __FILE__ ": Failure in switching to %d. (%d) We need a full reset here!\n", pending_mode, ret);
+ printk(KERN_WARNING __FILE__ ": Failure to switch modes, resetting device...\n");
+ olpc_reconnect(psmouse);
}
int olpc_init(struct psmouse *psmouse)
More information about the Commits-kernel
mailing list