usb-bsd: convert to QOM
authorAnthony Liguori <aliguori@us.ibm.com>
Fri, 3 Feb 2012 23:41:59 +0000 (17:41 -0600)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 4 Feb 2012 17:24:41 +0000 (17:24 +0000)
Simple enough.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
usb-bsd.c

index 2c6afc8f32d4a204f52a70e9a2b4891540069d4f..43fd1a15260317a237539c3be5d8ec9fc9a426af 100644 (file)
--- a/usb-bsd.c
+++ b/usb-bsd.c
@@ -410,15 +410,16 @@ static void usb_host_class_initfn(ObjectClass *klass, void *data)
     uc->handle_destroy = usb_host_handle_destroy;
 }
 
-static struct DeviceInfo usb_host_dev_info = {
-    .name      = "usb-host",
-    .size      = sizeof(USBHostDevice),
-    .class_init= usb_host_initfn,
+static TypeInfo usb_host_dev_info = {
+    .name          = "usb-host",
+    .parent        = TYPE_USB_DEVICE,
+    .instance_size = sizeof(USBHostDevice),
+    .class_init    = usb_host_initfn,
 };
 
 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)