aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorMiroslav Rezanina <mrezanin@redhat.com>2013-09-03 11:23:09 +0200
committerGerd Hoffmann <kraxel@redhat.com>2013-09-10 11:14:42 +0200
commit615fe4de4b3c26619611078960d3103550bde7d0 (patch)
tree131a60494fd466632ddba6d83df357d96f23a172 /vl.c
parent644e1a8a34d2f799bfeefae94b71593a2aa662ae (diff)
Remove dev-bluetooth.c dependency from vl.c
Use usb_legacy_register handling to create bt-dongle device and remove code dependency from vl.c so CONFIG_USB_BLUETOOTH can be disabled. Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/vl.c b/vl.c
index faefd9f3df..4e709d5c1c 100644
--- a/vl.c
+++ b/vl.c
@@ -1457,8 +1457,10 @@ static void configure_msg(QemuOpts *opts)
static int usb_device_add(const char *devname)
{
- const char *p;
USBDevice *dev = NULL;
+#ifndef CONFIG_LINUX
+ const char *p;
+#endif
if (!usb_enabled(false)) {
return -1;
@@ -1474,15 +1476,8 @@ static int usb_device_add(const char *devname)
/* only the linux version is qdev-ified, usb-bsd still needs this */
if (strstart(devname, "host:", &p)) {
dev = usb_host_device_open(usb_bus_find(-1), p);
- } else
-#endif
- if (!strcmp(devname, "bt") || strstart(devname, "bt:", &p)) {
- dev = usb_bt_init(usb_bus_find(-1),
- devname[2] ? hci_init(p)
- : bt_new_hci(qemu_find_bt_vlan(0)));
- } else {
- return -1;
}
+#endif
if (!dev)
return -1;