Patchwork usb-wacom: fix usb_wacom_initfn regression

login
register
mail settings
Submitter Spencer Oliver
Date April 23, 2010, 8:53 a.m.
Message ID <4BD15FFC.5030800@spen-soft.co.uk>
Download mbox | patch
Permalink /patch/50800/
State New
Headers show

Comments

Spencer Oliver - April 23, 2010, 8:53 a.m.
From 2c0a39852848d146e27843ab3b45ff8cdf49ba86 Mon Sep 17 00:00:00 2001
From: Spencer Oliver <spen@spen-soft.co.uk>
Date: Fri, 23 Apr 2010 09:07:23 +0100
Subject: [PATCH] usb-wacom: fix usb_wacom_initfn regression

eh_entry was not intialized and so produced a seg fault
when WACOM_SET_REPORT was called.
---
 hw/usb-wacom.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/usb-wacom.c b/hw/usb-wacom.c
index fe052eb..49766ac 100644
--- a/hw/usb-wacom.c
+++ b/hw/usb-wacom.c
@@ -404,6 +404,9 @@  static int usb_wacom_initfn(USBDevice *dev)
 {
     USBWacomState *s = DO_UPCAST(USBWacomState, dev, dev);
     s->dev.speed = USB_SPEED_FULL;
+    s->eh_entry = qemu_add_mouse_event_handler(usb_mouse_event, s, 0,
+                    "QEMU PenPartner tablet");
+    /* Force poll routine to be run and grab input the first time.  */
     s->changed = 1;
     return 0;
 }