aboutsummaryrefslogtreecommitdiff
path: root/usb-bsd.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2012-02-27 15:18:47 +0100
committerGerd Hoffmann <kraxel@redhat.com>2012-02-27 15:40:53 +0100
commit3741715cf2e54727fe3d9884ea6dcea68c7f7d4b (patch)
tree99dfc7e4ca9c85e5fd3ace161b125169ae4c87e8 /usb-bsd.c
parente64722108c1342d499d408c386ce65794c44dd63 (diff)
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>
Diffstat (limited to 'usb-bsd.c')
-rw-r--r--usb-bsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usb-bsd.c b/usb-bsd.c
index 4fa4b42158..ec26266620 100644
--- a/usb-bsd.c
+++ b/usb-bsd.c
@@ -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) {