From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGm4X-0008TI-1h for qemu-devel@nongnu.org; Tue, 03 Sep 2013 04:34:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VGm4O-0001uS-Kk for qemu-devel@nongnu.org; Tue, 03 Sep 2013 04:34:48 -0400 Received: from mail-ee0-x22d.google.com ([2a00:1450:4013:c00::22d]:54015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VGm4O-0001uL-DK for qemu-devel@nongnu.org; Tue, 03 Sep 2013 04:34:40 -0400 Received: by mail-ee0-f45.google.com with SMTP id c50so2826376eek.18 for ; Tue, 03 Sep 2013 01:34:39 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <52259F1E.3030400@redhat.com> Date: Tue, 03 Sep 2013 10:34:38 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv2] Make usb-bt-dongle configurable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mrezanin@redhat.com Cc: qemu-devel@nongnu.org Il 03/09/2013 09:26, mrezanin@redhat.com ha scritto: > From: Miroslav Rezanina > > Use usb_legacy_register handling to create bt-dongle device. This allows > to disable usb-bt-dongle device using CONFIG_BLUETOOTH option. > > Signed-off-by: Miroslav Rezanina > --- Looks good to me, just one small improvement I can suggest: > static int bt_hci_parse(const char *str) > { > struct HCIInfo *hci; > @@ -1526,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; > @@ -1545,13 +1478,7 @@ static int usb_device_add(const char *devname) > 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; You can remove this "return" too. Paolo > - } > if (!dev) > return -1; > >