Revision 62aed765 hw/usb-hub.c
b/hw/usb-hub.c | ||
---|---|---|
533 | 533 |
} |
534 | 534 |
}; |
535 | 535 |
|
536 |
static struct USBDeviceInfo hub_info = { |
|
537 |
.product_desc = "QEMU USB Hub", |
|
538 |
.qdev.name = "usb-hub", |
|
539 |
.qdev.fw_name = "hub", |
|
540 |
.qdev.size = sizeof(USBHubState), |
|
541 |
.qdev.vmsd = &vmstate_usb_hub, |
|
542 |
.usb_desc = &desc_hub, |
|
543 |
.init = usb_hub_initfn, |
|
544 |
.handle_packet = usb_hub_handle_packet, |
|
545 |
.handle_reset = usb_hub_handle_reset, |
|
546 |
.handle_control = usb_hub_handle_control, |
|
547 |
.handle_data = usb_hub_handle_data, |
|
548 |
.handle_destroy = usb_hub_handle_destroy, |
|
536 |
static void usb_hub_class_initfn(ObjectClass *klass, void *data) |
|
537 |
{ |
|
538 |
USBDeviceClass *uc = USB_DEVICE_CLASS(klass); |
|
539 |
|
|
540 |
uc->init = usb_hub_initfn; |
|
541 |
uc->product_desc = "QEMU USB Hub"; |
|
542 |
uc->usb_desc = &desc_hub; |
|
543 |
uc->handle_packet = usb_hub_handle_packet; |
|
544 |
uc->handle_reset = usb_hub_handle_reset; |
|
545 |
uc->handle_control = usb_hub_handle_control; |
|
546 |
uc->handle_data = usb_hub_handle_data; |
|
547 |
uc->handle_destroy = usb_hub_handle_destroy; |
|
548 |
} |
|
549 |
|
|
550 |
static struct DeviceInfo hub_info = { |
|
551 |
.name = "usb-hub", |
|
552 |
.fw_name = "hub", |
|
553 |
.size = sizeof(USBHubState), |
|
554 |
.vmsd = &vmstate_usb_hub, |
|
555 |
.class_init= usb_hub_class_initfn, |
|
549 | 556 |
}; |
550 | 557 |
|
551 | 558 |
static void usb_hub_register_devices(void) |
552 | 559 |
{ |
553 |
usb_qdev_register(&hub_info); |
|
560 |
usb_qdev_register(&hub_info, NULL, NULL);
|
|
554 | 561 |
} |
555 | 562 |
device_init(usb_hub_register_devices) |
Also available in: Unified diff