Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279384
b: refs/heads/master
c: f2d64f6
h: refs/heads/master
v: v3
  • Loading branch information
Ulisses Furquim authored and Gustavo F. Padovan committed Dec 21, 2011
1 parent d52c922 commit 412dbf1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fa0fb93f2ac308a76fa64eb57c18511dadf97089
refs/heads/master: f2d64f6aa6c681ca00a71c2b3304ed80dc317752
21 changes: 1 addition & 20 deletions trunk/net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ static void hci_rx_work(struct work_struct *work);
static void hci_cmd_work(struct work_struct *work);
static void hci_tx_work(struct work_struct *work);

static DEFINE_MUTEX(hci_task_lock);

/* HCI device list */
LIST_HEAD(hci_dev_list);
DEFINE_RWLOCK(hci_dev_list_lock);
Expand Down Expand Up @@ -1832,8 +1830,7 @@ EXPORT_SYMBOL(hci_recv_stream_fragment);

/* ---- Interface to upper protocols ---- */

/* Register/Unregister protocols.
* hci_task_lock is used to ensure that no tasks are running. */
/* Register/Unregister protocols. */
int hci_register_proto(struct hci_proto *hp)
{
int err = 0;
Expand All @@ -1843,15 +1840,11 @@ int hci_register_proto(struct hci_proto *hp)
if (hp->id >= HCI_MAX_PROTO)
return -EINVAL;

mutex_lock(&hci_task_lock);

if (!hci_proto[hp->id])
hci_proto[hp->id] = hp;
else
err = -EEXIST;

mutex_unlock(&hci_task_lock);

return err;
}
EXPORT_SYMBOL(hci_register_proto);
Expand All @@ -1865,15 +1858,11 @@ int hci_unregister_proto(struct hci_proto *hp)
if (hp->id >= HCI_MAX_PROTO)
return -EINVAL;

mutex_lock(&hci_task_lock);

if (hci_proto[hp->id])
hci_proto[hp->id] = NULL;
else
err = -ENOENT;

mutex_unlock(&hci_task_lock);

return err;
}
EXPORT_SYMBOL(hci_unregister_proto);
Expand Down Expand Up @@ -2439,8 +2428,6 @@ static void hci_tx_work(struct work_struct *work)
struct hci_dev *hdev = container_of(work, struct hci_dev, tx_work);
struct sk_buff *skb;

mutex_lock(&hci_task_lock);

BT_DBG("%s acl %d sco %d le %d", hdev->name, hdev->acl_cnt,
hdev->sco_cnt, hdev->le_cnt);

Expand All @@ -2457,8 +2444,6 @@ static void hci_tx_work(struct work_struct *work)
/* Send next queued raw (unknown type) packet */
while ((skb = skb_dequeue(&hdev->raw_q)))
hci_send_frame(skb);

mutex_unlock(&hci_task_lock);
}

/* ----- HCI RX task (incoming data processing) ----- */
Expand Down Expand Up @@ -2546,8 +2531,6 @@ static void hci_rx_work(struct work_struct *work)

BT_DBG("%s", hdev->name);

mutex_lock(&hci_task_lock);

while ((skb = skb_dequeue(&hdev->rx_q))) {
if (atomic_read(&hdev->promisc)) {
/* Send copy to the sockets */
Expand Down Expand Up @@ -2591,8 +2574,6 @@ static void hci_rx_work(struct work_struct *work)
break;
}
}

mutex_unlock(&hci_task_lock);
}

static void hci_cmd_work(struct work_struct *work)
Expand Down

0 comments on commit 412dbf1

Please sign in to comment.