[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 18/28] host-libusb: remove bootindex property fro
From: |
arei.gonglei |
Subject: |
[Qemu-devel] [PATCH v7 18/28] host-libusb: remove bootindex property from qdev to qom |
Date: |
Fri, 5 Sep 2014 16:37:26 +0800 |
From: Gonglei <address@hidden>
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 <address@hidden>
---
hw/usb/host-libusb.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c
index c189147..a2fa70e 100644
--- a/hw/usb/host-libusb.c
+++ b/hw/usb/host-libusb.c
@@ -980,6 +980,17 @@ static int usb_host_initfn(USBDevice *udev)
return 0;
}
+static void usb_host_instance_init(Object *obj)
+{
+ USBDevice *udev = USB_DEVICE(obj);
+ USBHostDevice *s = USB_HOST_DEVICE(udev);
+
+ device_add_bootindex_property(obj, &s->bootindex,
+ "bootindex", NULL,
+ &udev->qdev, NULL);
+ object_property_set_int(obj, -1, "bootindex", NULL);
+}
+
static void usb_host_handle_destroy(USBDevice *udev)
{
USBHostDevice *s = USB_HOST_DEVICE(udev);
@@ -1464,7 +1475,6 @@ static Property usb_host_dev_properties[] = {
DEFINE_PROP_UINT32("productid", USBHostDevice, match.product_id, 0),
DEFINE_PROP_UINT32("isobufs", USBHostDevice, iso_urb_count, 4),
DEFINE_PROP_UINT32("isobsize", USBHostDevice, iso_urb_frames, 32),
- DEFINE_PROP_INT32("bootindex", USBHostDevice, bootindex, -1),
DEFINE_PROP_UINT32("loglevel", USBHostDevice, loglevel,
LIBUSB_LOG_LEVEL_WARNING),
DEFINE_PROP_BIT("pipeline", USBHostDevice, options,
@@ -1497,6 +1507,7 @@ static TypeInfo usb_host_dev_info = {
.parent = TYPE_USB_DEVICE,
.instance_size = sizeof(USBHostDevice),
.class_init = usb_host_class_initfn,
+ .instance_init = usb_host_instance_init,
};
static void usb_host_register_types(void)
--
1.7.12.4
- [Qemu-devel] [PATCH v7 00/28] modify boot order of guest, and take effect after rebooting, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 13/28] rtl8139: add bootindex to qom property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 11/28] ne2000: add bootindex to qom property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 15/28] vmxnet3: add bootindex to qom property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 14/28] spapr_lian: add bootindex to qom property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 19/28] pci-assign: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 18/28] host-libusb: remove bootindex property from qdev to qom,
arei.gonglei <=
- [Qemu-devel] [PATCH v7 17/28] net: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 16/28] usb-net: add bootindex to qom property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 07/28] bootindex: add a setter/getter functions wrapper for bootindex property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 03/28] bootindex: add del_boot_device_path function, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 20/28] vfio: remove bootindex property from qdev to qom, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 22/28] isa-fdc: remove bootindexA/B property from qdev to qom, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 23/28] scsi: add bootindex to qom property, arei.gonglei, 2014/09/05
- [Qemu-devel] [PATCH v7 09/28] e1000: add bootindex to qom property, arei.gonglei, 2014/09/05