summaryrefslogtreecommitdiff
path: root/drivers/bluetooth/btsdio.c
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-01-20 14:01:31 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-01-20 14:01:31 -0300
commitb4b7ff4b08e691656c9d77c758fc355833128ac0 (patch)
tree82fcb00e6b918026dc9f2d1f05ed8eee83874cc0 /drivers/bluetooth/btsdio.c
parent35acfa0fc609f2a2cd95cef4a6a9c3a5c38f1778 (diff)
Linux-libre 4.4-gnupck-4.4-gnu
Diffstat (limited to 'drivers/bluetooth/btsdio.c')
-rw-r--r--drivers/bluetooth/btsdio.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c
index 83f6437dd..7b624423a 100644
--- a/drivers/bluetooth/btsdio.c
+++ b/drivers/bluetooth/btsdio.c
@@ -194,21 +194,15 @@ static int btsdio_open(struct hci_dev *hdev)
BT_DBG("%s", hdev->name);
- if (test_and_set_bit(HCI_RUNNING, &hdev->flags))
- return 0;
-
sdio_claim_host(data->func);
err = sdio_enable_func(data->func);
- if (err < 0) {
- clear_bit(HCI_RUNNING, &hdev->flags);
+ if (err < 0)
goto release;
- }
err = sdio_claim_irq(data->func, btsdio_interrupt);
if (err < 0) {
sdio_disable_func(data->func);
- clear_bit(HCI_RUNNING, &hdev->flags);
goto release;
}
@@ -229,9 +223,6 @@ static int btsdio_close(struct hci_dev *hdev)
BT_DBG("%s", hdev->name);
- if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags))
- return 0;
-
sdio_claim_host(data->func);
sdio_writeb(data->func, 0x00, REG_EN_INTRD, NULL);
@@ -261,9 +252,6 @@ static int btsdio_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
BT_DBG("%s", hdev->name);
- if (!test_bit(HCI_RUNNING, &hdev->flags))
- return -EBUSY;
-
switch (bt_cb(skb)->pkt_type) {
case HCI_COMMAND_PKT:
hdev->stat.cmd_tx++;