From: Paolo Bonzini <pbonzini@redhat.com>
To: mrezanin@redhat.com
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCHv2] Make usb-bt-dongle configurable
Date: Tue, 03 Sep 2013 10:34:38 +0200 [thread overview]
Message-ID: <52259F1E.3030400@redhat.com> (raw)
In-Reply-To: <fc4ad2cce7093425d113dd2d8f97048a990413cd.1378192732.git.mrezanin@redhat.com>
Il 03/09/2013 09:26, mrezanin@redhat.com ha scritto:
> From: Miroslav Rezanina <mrezanin@redhat.com>
>
> 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 <mrezanin@redhat.com>
> ---
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;
>
>
prev parent reply other threads:[~2013-09-03 8:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-03 7:26 [Qemu-devel] [PATCHv2] Make usb-bt-dongle configurable mrezanin
2013-09-03 7:41 ` Gerd Hoffmann
2013-09-03 8:46 ` Miroslav Rezanina
2013-09-03 11:33 ` Gerd Hoffmann
2013-09-03 8:34 ` Paolo Bonzini [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52259F1E.3030400@redhat.com \
--to=pbonzini@redhat.com \
--cc=mrezanin@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.