qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCHv2] Make usb-bt-dongle configurable


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCHv2] Make usb-bt-dongle configurable
Date: Tue, 03 Sep 2013 10:34:38 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

Il 03/09/2013 09:26, address@hidden ha scritto:
> From: Miroslav Rezanina <address@hidden>
> 
> 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 <address@hidden>
> ---

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]