usb-bsd: convert to QOM

Simple enough.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Anthony Liguori 2012-02-03 17:41:59 -06:00 committed by Blue Swirl
parent 47c012e21c
commit d217d208b5

View File

@ -410,15 +410,16 @@ static void usb_host_class_initfn(ObjectClass *klass, void *data)
uc->handle_destroy = usb_host_handle_destroy; uc->handle_destroy = usb_host_handle_destroy;
} }
static struct DeviceInfo usb_host_dev_info = { static TypeInfo usb_host_dev_info = {
.name = "usb-host", .name = "usb-host",
.size = sizeof(USBHostDevice), .parent = TYPE_USB_DEVICE,
.class_init= usb_host_initfn, .instance_size = sizeof(USBHostDevice),
.class_init = usb_host_initfn,
}; };
static void usb_host_register_devices(void) static void usb_host_register_devices(void)
{ {
usb_qdev_register(&usb_host_dev_info, NULL, NULL); type_register_static(&usb_host_dev_info);
} }
device_init(usb_host_register_devices) device_init(usb_host_register_devices)