From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=44139 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLybl-0004sL-Pt for qemu-devel@nongnu.org; Tue, 08 Jun 2010 09:12:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLybS-0001wT-2s for qemu-devel@nongnu.org; Tue, 08 Jun 2010 09:12:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5342) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLybR-0001wN-Qw for qemu-devel@nongnu.org; Tue, 08 Jun 2010 09:12:26 -0400 From: Jes.Sorensen@redhat.com Date: Tue, 8 Jun 2010 15:12:17 +0200 Message-Id: <1276002738-821-1-git-send-email-Jes.Sorensen@redhat.com> Subject: [Qemu-devel] [PATCH v2] un-register kbd driver for USB kbd unplug List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, shavivi@redhat.com, qemu-devel@nongnu.org, Jes Sorensen From: Jes Sorensen Hi, Kevin pointed out the TODO comment was obsolete and also suggested turning the if lines into a switch statement. It seems cleaner, so here is a second version of the patch. This is a fairly simple fix for the problem where the keyboard event handler is left in place when a keyboard is unplugged, eg. USB. The long term solution would be to use Shahar Havivi's multi-keyboard support patch[1] from March, but until Shahar's patch is ready, this one fixes the current crash problem. Cheers, Jes [1]: http://www.mail-archive.com/qemu-devel@nongnu.org/msg28589.html Jes Sorensen (1): un-register kbd driver in case of USB kbd unplug. console.h | 1 + hw/usb-hid.c | 8 ++++++-- input.c | 6 ++++++ 3 files changed, 13 insertions(+), 2 deletions(-)