qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v7 18/28] host-libusb: remove bootindex property


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v7 18/28] host-libusb: remove bootindex property from qdev to qom
Date: Fri, 05 Sep 2014 11:06:06 +0200

> +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);

I think the object_property_set_int() call can be moved to
device_add_bootindex_property, so there is no need to duplicate the call
to init bootindex with -1 in all devices.

cheers,
  Gerd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]