static void usbredir_class_initfn(ObjectClass *klass, void *data)
{
    USBDeviceClass *uc = USB_DEVICE_CLASS(klass);
    DeviceClass *dc = DEVICE_CLASS(klass);

    uc->realize        = usbredir_realize;
    uc->product_desc   = "USB Redirection Device";
    uc->unrealize      = usbredir_unrealize;
    uc->cancel_packet  = usbredir_cancel_packet;
    uc->handle_reset   = usbredir_handle_reset;
    uc->handle_data    = usbredir_handle_data;
    uc->handle_control = usbredir_handle_control;
    uc->flush_ep_queue = usbredir_flush_ep_queue;
    uc->ep_stopped     = usbredir_ep_stopped;
    uc->alloc_streams  = usbredir_alloc_streams;
    uc->free_streams   = usbredir_free_streams;
    dc->vmsd           = &usbredir_vmstate;
    device_class_set_props(dc, usbredir_properties);
    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
}
static void usbredir_class_initfn(ObjectClass *klass, void *data)
{
    USBDeviceClass *uc = USB_DEVICE_CLASS(klass);
    DeviceClass *dc = DEVICE_CLASS(klass);

    uc->realize        = usbredir_realize;
    uc->product_desc   = "USB Redirection Device";
    uc->unrealize      = usbredir_unrealize;
    uc->cancel_packet  = usbredir_cancel_packet;
    uc->handle_reset   = usbredir_handle_reset;
    uc->handle_data    = usbredir_handle_data;
    uc->handle_control = usbredir_handle_control;
    uc->flush_ep_queue = usbredir_flush_ep_queue;
    uc->ep_stopped     = usbredir_ep_stopped;
    uc->alloc_streams  = usbredir_alloc_streams;
    uc->free_streams   = usbredir_free_streams;
    dc->vmsd           = &usbredir_vmstate;
    device_class_set_props(dc, usbredir_properties);
    set_bit(DEVICE_CATEGORY_MISC, dc->categories);
}