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>
This commit is contained in:
Miroslav Rezanina 2013-09-03 11:23:09 +02:00 committed by Gerd Hoffmann
parent 644e1a8a34
commit 615fe4de4b
4 changed files with 13 additions and 16 deletions

13
vl.c
View file

@ -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;