summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-03-20 18:11:58 +0100
committerPeter Wu <peter@lekensteyn.nl>2014-03-20 18:11:58 +0100
commit7692e3db0ac2d2790b85c494da31fec7f4c59ab6 (patch)
tree8ca4b42cc0830828c837621e3835ad157ccdd28b
parent01b3362c1465ffcaa770cfcd64f0f609ee75d1aa (diff)
downloadqemu-7692e3db0ac2d2790b85c494da31fec7f4c59ab6.tar.gz
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 <peter@lekensteyn.nl>
-rw-r--r--hw/usb/dev-unifying.c5
1 files changed, 0 insertions, 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;