aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/dev-hid.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb/dev-hid.c')
-rw-r--r--hw/usb/dev-hid.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/usb/dev-hid.c b/hw/usb/dev-hid.c
index c73f7b2fe2..05cfe6baca 100644
--- a/hw/usb/dev-hid.c
+++ b/hw/usb/dev-hid.c
@@ -34,18 +34,21 @@
#include "hw/input/hid.h"
#include "hw/usb/hid.h"
#include "hw/qdev-properties.h"
+#include "qom/object.h"
-typedef struct USBHIDState {
+struct USBHIDState {
USBDevice dev;
USBEndpoint *intr;
HIDState hid;
uint32_t usb_version;
char *display;
uint32_t head;
-} USBHIDState;
+};
+typedef struct USBHIDState USBHIDState;
#define TYPE_USB_HID "usb-hid"
-#define USB_HID(obj) OBJECT_CHECK(USBHIDState, (obj), TYPE_USB_HID)
+DECLARE_INSTANCE_CHECKER(USBHIDState, USB_HID,
+ TYPE_USB_HID)
enum {
STR_MANUFACTURER = 1,