Commit ad0cb27c authored by David S. Miller's avatar David S. Miller

Merge branch 'for-upstream' of...

Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next

Johan Hedberg says:

====================
pull request: bluetooth-next 2017-04-22

Here are some more Bluetooth patches (and one 802.15.4 patch) in the
bluetooth-next tree targeting the 4.12 kernel. Most of them are pure
fixes.

Please let me know if there are any issues pulling. Thanks.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 11a9ec43 d160b74d
...@@ -76,6 +76,12 @@ config BT_HCIUART ...@@ -76,6 +76,12 @@ config BT_HCIUART
Say Y here to compile support for Bluetooth UART devices into the Say Y here to compile support for Bluetooth UART devices into the
kernel or say M to compile it as module (hci_uart). kernel or say M to compile it as module (hci_uart).
config BT_HCIUART_SERDEV
bool
depends on SERIAL_DEV_BUS && BT_HCIUART
depends on SERIAL_DEV_BUS=y || SERIAL_DEV_BUS=BT_HCIUART
default y
config BT_HCIUART_H4 config BT_HCIUART_H4
bool "UART (H4) protocol support" bool "UART (H4) protocol support"
depends on BT_HCIUART depends on BT_HCIUART
...@@ -89,7 +95,7 @@ config BT_HCIUART_H4 ...@@ -89,7 +95,7 @@ config BT_HCIUART_H4
config BT_HCIUART_NOKIA config BT_HCIUART_NOKIA
tristate "UART Nokia H4+ protocol support" tristate "UART Nokia H4+ protocol support"
depends on BT_HCIUART depends on BT_HCIUART
depends on SERIAL_DEV_BUS depends on BT_HCIUART_SERDEV
depends on PM depends on PM
help help
Nokia H4+ is serial protocol for communication between Bluetooth Nokia H4+ is serial protocol for communication between Bluetooth
......
...@@ -31,7 +31,7 @@ btmrvl-y := btmrvl_main.o ...@@ -31,7 +31,7 @@ btmrvl-y := btmrvl_main.o
btmrvl-$(CONFIG_DEBUG_FS) += btmrvl_debugfs.o btmrvl-$(CONFIG_DEBUG_FS) += btmrvl_debugfs.o
hci_uart-y := hci_ldisc.o hci_uart-y := hci_ldisc.o
hci_uart-$(CONFIG_SERIAL_DEV_BUS) += hci_serdev.o hci_uart-$(CONFIG_BT_HCIUART_SERDEV) += hci_serdev.o
hci_uart-$(CONFIG_BT_HCIUART_H4) += hci_h4.o hci_uart-$(CONFIG_BT_HCIUART_H4) += hci_h4.o
hci_uart-$(CONFIG_BT_HCIUART_BCSP) += hci_bcsp.o hci_uart-$(CONFIG_BT_HCIUART_BCSP) += hci_bcsp.o
hci_uart-$(CONFIG_BT_HCIUART_LL) += hci_ll.o hci_uart-$(CONFIG_BT_HCIUART_LL) += hci_ll.o
......
...@@ -177,6 +177,7 @@ static void hci_uart_init_work(struct work_struct *work) ...@@ -177,6 +177,7 @@ static void hci_uart_init_work(struct work_struct *work)
{ {
struct hci_uart *hu = container_of(work, struct hci_uart, init_ready); struct hci_uart *hu = container_of(work, struct hci_uart, init_ready);
int err; int err;
struct hci_dev *hdev;
if (!test_and_clear_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags)) if (!test_and_clear_bit(HCI_UART_INIT_PENDING, &hu->hdev_flags))
return; return;
...@@ -184,9 +185,12 @@ static void hci_uart_init_work(struct work_struct *work) ...@@ -184,9 +185,12 @@ static void hci_uart_init_work(struct work_struct *work)
err = hci_register_dev(hu->hdev); err = hci_register_dev(hu->hdev);
if (err < 0) { if (err < 0) {
BT_ERR("Can't register HCI device"); BT_ERR("Can't register HCI device");
hci_free_dev(hu->hdev); hdev = hu->hdev;
hu->hdev = NULL; hu->hdev = NULL;
hci_free_dev(hdev);
clear_bit(HCI_UART_PROTO_READY, &hu->flags);
hu->proto->close(hu); hu->proto->close(hu);
return;
} }
set_bit(HCI_UART_REGISTERED, &hu->flags); set_bit(HCI_UART_REGISTERED, &hu->flags);
...@@ -602,6 +606,7 @@ static int hci_uart_register_dev(struct hci_uart *hu) ...@@ -602,6 +606,7 @@ static int hci_uart_register_dev(struct hci_uart *hu)
if (hci_register_dev(hdev) < 0) { if (hci_register_dev(hdev) < 0) {
BT_ERR("Can't register HCI device"); BT_ERR("Can't register HCI device");
hu->hdev = NULL;
hci_free_dev(hdev); hci_free_dev(hdev);
return -ENODEV; return -ENODEV;
} }
......
...@@ -537,8 +537,7 @@ static int read_local_version(struct hci_dev *hdev) ...@@ -537,8 +537,7 @@ static int read_local_version(struct hci_dev *hdev)
if (IS_ERR(skb)) { if (IS_ERR(skb)) {
bt_dev_err(hdev, "Reading TI version information failed (%ld)", bt_dev_err(hdev, "Reading TI version information failed (%ld)",
PTR_ERR(skb)); PTR_ERR(skb));
err = PTR_ERR(skb); return PTR_ERR(skb);
goto out;
} }
if (skb->len != sizeof(*ver)) { if (skb->len != sizeof(*ver)) {
err = -EILSEQ; err = -EILSEQ;
......
...@@ -86,8 +86,8 @@ config IEEE802154_ADF7242 ...@@ -86,8 +86,8 @@ config IEEE802154_ADF7242
config IEEE802154_CA8210 config IEEE802154_CA8210
tristate "Cascoda CA8210 transceiver driver" tristate "Cascoda CA8210 transceiver driver"
depends on IEEE802154_DRIVERS && MAC802154 depends on IEEE802154_DRIVERS && MAC802154
depends on COMMON_CLK
depends on SPI depends on SPI
select COMMON_CLK
---help--- ---help---
Say Y here to enable the CA8210 SPI 802.15.4 wireless Say Y here to enable the CA8210 SPI 802.15.4 wireless
controller. controller.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment