aboutsummaryrefslogtreecommitdiff
path: root/hw/usb.h
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 /hw/usb.h
parente64722108c1342d499d408c386ce65794c44dd63 (diff)
downloadqemu-3741715cf2e54727fe3d9884ea6dcea68c7f7d4b.zip
qemu-3741715cf2e54727fe3d9884ea6dcea68c7f7d4b.tar.gz
qemu-3741715cf2e54727fe3d9884ea6dcea68c7f7d4b.tar.bz2
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 'hw/usb.h')
-rw-r--r--hw/usb.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/usb.h b/hw/usb.h
index 4470ea8..8e83697 100644
--- a/hw/usb.h
+++ b/hw/usb.h
@@ -373,12 +373,12 @@ void usb_generic_async_ctrl_complete(USBDevice *s, USBPacket *p);
int set_usb_string(uint8_t *buf, const char *str);
/* usb-linux.c */
-USBDevice *usb_host_device_open(const char *devname);
+USBDevice *usb_host_device_open(USBBus *bus, const char *devname);
int usb_host_device_close(const char *devname);
void usb_host_info(Monitor *mon);
/* usb-bt.c */
-USBDevice *usb_bt_init(HCIInfo *hci);
+USBDevice *usb_bt_init(USBBus *bus, HCIInfo *hci);
/* usb ports of the VM */
@@ -431,7 +431,8 @@ struct USBBusOps {
void usb_bus_new(USBBus *bus, USBBusOps *ops, DeviceState *host);
USBBus *usb_bus_find(int busnr);
void usb_legacy_register(const char *typename, const char *usbdevice_name,
- USBDevice *(*usbdevice_init)(const char *params));
+ USBDevice *(*usbdevice_init)(USBBus *bus,
+ const char *params));
USBDevice *usb_create(USBBus *bus, const char *name);
USBDevice *usb_create_simple(USBBus *bus, const char *name);
USBDevice *usbdevice_create(const char *cmdline);