mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
usb: Resolve warnings about unassigned bus on usb device creation
When creating an USB device the old way, there is no way to specify the target bus. Thus the warning issued by usb_create makes no sense and rather confuses our users. Resolve this by passing a bus reference to the usbdevice_init handler and letting those handlers forward it to usb_create. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
e64722108c
commit
3741715cf2
9 changed files with 26 additions and 34 deletions
|
@ -298,7 +298,7 @@ static int usb_host_initfn(USBDevice *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
USBDevice *usb_host_device_open(const char *devname)
|
||||
USBDevice *usb_host_device_open(USBBus *guest_bus, const char *devname)
|
||||
{
|
||||
struct usb_device_info bus_info, dev_info;
|
||||
USBDevice *d = NULL, *ret = NULL;
|
||||
|
@ -358,7 +358,7 @@ USBDevice *usb_host_device_open(const char *devname)
|
|||
goto fail_dfd;
|
||||
}
|
||||
|
||||
d = usb_create(NULL /* FIXME */, "usb-host");
|
||||
d = usb_create(guest_bus, "usb-host");
|
||||
dev = DO_UPCAST(USBHostDevice, dev, d);
|
||||
|
||||
if (dev_info.udi_speed == 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue