From 7692e3db0ac2d2790b85c494da31fec7f4c59ab6 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Thu, 20 Mar 2014 18:11:58 +0100 Subject: unifying: remove unnecessary commented out code The USB_CFG_ATT_WAKEUP seems to be ignored by the device, perhaps it gets handled by the OS. usb_desc_attach is not necessary because we only have one full-speed configuration. If there would also be a high-speed (or super-speed) configuration, then usb_desc_attach must be added back to allow picking an appropriate configuration based on the speed of the controller port (UHCI, EHCI, XHCI). usb_desc_init() takes care of setting the initial configuration (there is only one now). Signed-off-by: Peter Wu --- hw/usb/dev-unifying.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/hw/usb/dev-unifying.c b/hw/usb/dev-unifying.c index d1904b01d2..218a654833 100644 --- a/hw/usb/dev-unifying.c +++ b/hw/usb/dev-unifying.c @@ -318,7 +318,6 @@ static const USBDescDevice desc_device_ltunify = { .bNumInterfaces = 3, .bConfigurationValue = 1, .iConfiguration = STR_CONFIG_FULL, - // TODO: USB_CFG_ATT_WAKEUP is reported, but how to handle it? .bmAttributes = USB_CFG_ATT_ONE | USB_CFG_ATT_WAKEUP, .bMaxPower = 49, /* 98 mA */ .nif = ARRAY_SIZE(desc_iface_ltunify), @@ -557,9 +556,6 @@ static void usb_ltunify_handle_destroy(USBDevice *dev) static int usb_ltunify_initfn(USBDevice *dev) { USBLtunifyState *s = DO_UPCAST(USBLtunifyState, dev, dev); - // This makes QEMU create a iSerial (using the serial attribute if - // available). Since we hard-code one, do not use it. - //usb_desc_create_serial(dev); // init device descriptors, etc. usb_desc_init(dev); @@ -604,7 +600,6 @@ static void usb_ltunify_class_init(ObjectClass *klass, void *data) uc->handle_control = usb_ltunify_handle_control; uc->handle_data = usb_ltunify_handle_data; uc->handle_destroy = usb_ltunify_handle_destroy; - // uc->handle_attach = usb_desc_attach; ?? found in dev-hid.c set_bit(DEVICE_CATEGORY_INPUT, dc->categories); dc->desc = "QEMU Logitech Unifying Receiver"; dc->vmsd = &vmstate_usb_ltunify; -- cgit v1.2.1