From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeKY0-0006s4-B2 for qemu-devel@nongnu.org; Wed, 15 Oct 2014 05:07:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeKXv-0007B3-Ad for qemu-devel@nongnu.org; Wed, 15 Oct 2014 05:07:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34595) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeKXu-0007Aw-Rs for qemu-devel@nongnu.org; Wed, 15 Oct 2014 05:07:03 -0400 From: Gerd Hoffmann Date: Wed, 15 Oct 2014 11:05:52 +0200 Message-Id: <1413363967-2489-20-git-send-email-kraxel@redhat.com> In-Reply-To: <1413363967-2489-1-git-send-email-kraxel@redhat.com> References: <1413363967-2489-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 19/34] host-libusb: remove bootindex property from qdev to qom List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gonglei , Gerd Hoffmann From: Gonglei 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 Reviewed-by: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- hw/usb/host-libusb.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index 45b74e5..906e429 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -982,6 +982,16 @@ static void usb_host_realize(USBDevice *udev, Error **errp) usb_host_auto_check(NULL); } +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); +} + static void usb_host_handle_destroy(USBDevice *udev) { USBHostDevice *s = USB_HOST_DEVICE(udev); @@ -1465,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, @@ -1498,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.8.3.1