usb-redir: convert to QOM
This was missed due to the fact that it's in the top level and it uses 'struct DeviceInfo' instead of 'DeviceInfo' for some strange reason. Tested-by: Benoît Canet <benoit.canet@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
53a19a3052
commit
3bc3634972
24
usb-redir.c
24
usb-redir.c
|
@ -1315,9 +1315,16 @@ static void usbredir_interrupt_packet(void *priv, uint32_t id,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Property usbredir_properties[] = {
|
||||||
|
DEFINE_PROP_CHR("chardev", USBRedirDevice, cs),
|
||||||
|
DEFINE_PROP_UINT8("debug", USBRedirDevice, debug, 0),
|
||||||
|
DEFINE_PROP_END_OF_LIST(),
|
||||||
|
};
|
||||||
|
|
||||||
static void usbredir_class_initfn(ObjectClass *klass, void *data)
|
static void usbredir_class_initfn(ObjectClass *klass, void *data)
|
||||||
{
|
{
|
||||||
USBDeviceClass *uc = USB_DEVICE_CLASS(klass);
|
USBDeviceClass *uc = USB_DEVICE_CLASS(klass);
|
||||||
|
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||||
|
|
||||||
uc->init = usbredir_initfn;
|
uc->init = usbredir_initfn;
|
||||||
uc->product_desc = "USB Redirection Device";
|
uc->product_desc = "USB Redirection Device";
|
||||||
|
@ -1327,21 +1334,18 @@ static void usbredir_class_initfn(ObjectClass *klass, void *data)
|
||||||
uc->handle_reset = usbredir_handle_reset;
|
uc->handle_reset = usbredir_handle_reset;
|
||||||
uc->handle_data = usbredir_handle_data;
|
uc->handle_data = usbredir_handle_data;
|
||||||
uc->handle_control = usbredir_handle_control;
|
uc->handle_control = usbredir_handle_control;
|
||||||
|
dc->props = usbredir_properties;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct DeviceInfo usbredir_dev_info = {
|
static TypeInfo usbredir_dev_info = {
|
||||||
.name = "usb-redir",
|
.name = "usb-redir",
|
||||||
.size = sizeof(USBRedirDevice),
|
.parent = TYPE_USB_DEVICE,
|
||||||
.class_init= usbredir_class_initfn,
|
.instance_size = sizeof(USBRedirDevice),
|
||||||
.props = (Property[]) {
|
.class_init = usbredir_class_initfn,
|
||||||
DEFINE_PROP_CHR("chardev", USBRedirDevice, cs),
|
|
||||||
DEFINE_PROP_UINT8("debug", USBRedirDevice, debug, 0),
|
|
||||||
DEFINE_PROP_END_OF_LIST(),
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static void usbredir_register_devices(void)
|
static void usbredir_register_devices(void)
|
||||||
{
|
{
|
||||||
usb_qdev_register(&usbredir_dev_info, NULL, NULL);
|
type_register_static(&usbredir_dev_info);
|
||||||
}
|
}
|
||||||
device_init(usbredir_register_devices);
|
device_init(usbredir_register_devices);
|
||||||
|
|
Loading…
Reference in New Issue