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