diff options
author | Gonglei <arei.gonglei@huawei.com> | 2014-10-07 16:00:26 +0800 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-10-15 09:52:55 +0200 |
commit | 295857994c834473f0f28ac33b50f97ca8e61199 (patch) | |
tree | e07e0e0cab66f9766c2594449551969e9e3b8dd6 /hw | |
parent | abc5b3bfe1c77ad622188341d1ee4d49de308ae3 (diff) | |
download | qemu-295857994c834473f0f28ac33b50f97ca8e61199.zip qemu-295857994c834473f0f28ac33b50f97ca8e61199.tar.gz qemu-295857994c834473f0f28ac33b50f97ca8e61199.tar.bz2 |
redirect: remove bootindex property from qdev to qom
Remove bootindex form qdev property to qom, things will
continue to work just fine, and we can use qom features
which are not supported by qdev property.
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/usb/redirect.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index e2c9896..95f1aa2 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -2471,7 +2471,6 @@ static Property usbredir_properties[] = { DEFINE_PROP_CHR("chardev", USBRedirDevice, cs), DEFINE_PROP_UINT8("debug", USBRedirDevice, debug, usbredirparser_warning), DEFINE_PROP_STRING("filter", USBRedirDevice, filter_str), - DEFINE_PROP_INT32("bootindex", USBRedirDevice, bootindex, -1), DEFINE_PROP_END_OF_LIST(), }; @@ -2496,11 +2495,22 @@ static void usbredir_class_initfn(ObjectClass *klass, void *data) set_bit(DEVICE_CATEGORY_MISC, dc->categories); } +static void usbredir_instance_init(Object *obj) +{ + USBDevice *udev = USB_DEVICE(obj); + USBRedirDevice *dev = DO_UPCAST(USBRedirDevice, dev, udev); + + device_add_bootindex_property(obj, &dev->bootindex, + "bootindex", NULL, + &udev->qdev, NULL); +} + static const TypeInfo usbredir_dev_info = { .name = "usb-redir", .parent = TYPE_USB_DEVICE, .instance_size = sizeof(USBRedirDevice), .class_init = usbredir_class_initfn, + .instance_init = usbredir_instance_init, }; static void usbredir_register_types(void) |