usb-hid: add hid_has_events()
commit38931fa8cfb074a08ce65fd1982bd4a5bef9d6fb
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 15 Jul 2011 12:46:39 +0000 (15 14:46 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 4 Aug 2011 13:51:51 +0000 (4 15:51 +0200)
tree68b15b7093f03f4b2804b03a577dfce0f01e93d7
parent8bde6805412a2808009a84f1ce5f47b88b0352d0
usb-hid: add hid_has_events()

Add hid_has_events function, use it to figure whenever there are pending
events instead of checking and updating USBHIDState->changed.

Setting ->changed to 1 on init is removed, that should have absolutely
no effect as the initial state of ->idle is 0 so we report hid state
anyway until the guest configures some idle time.  Also should clear
->idle on reset.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb-hid.c