Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290865
b: refs/heads/master
c: 4c724c7
h: refs/heads/master
i:
  290863: 4868745
v: v3
  • Loading branch information
David Herrmann authored and Johan Hedberg committed Feb 13, 2012
1 parent ce1acb8 commit 19320e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 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: e9b9cfa1575e37cb2dbb5534aeaaa16814228887
refs/heads/master: 4c724c7135ca2b407bd318b4267456a7b5723825
5 changes: 2 additions & 3 deletions trunk/include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ struct adv_entry {
struct hci_dev {
struct list_head list;
struct mutex lock;
atomic_t refcnt;

char name[8];
unsigned long flags;
Expand Down Expand Up @@ -592,7 +591,7 @@ static inline void hci_conn_put(struct hci_conn *conn)
/* ----- HCI Devices ----- */
static inline void __hci_dev_put(struct hci_dev *d)
{
atomic_dec(&d->refcnt);
put_device(&d->dev);
}

/*
Expand All @@ -603,7 +602,7 @@ static inline void __hci_dev_put(struct hci_dev *d)

static inline struct hci_dev *__hci_dev_hold(struct hci_dev *d)
{
atomic_inc(&d->refcnt);
get_device(&d->dev);
return d;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,6 @@ int hci_register_dev(struct hci_dev *hdev)
hdev->id = id;
list_add_tail(&hdev->list, head);

atomic_set(&hdev->refcnt, 1);
mutex_init(&hdev->lock);

hdev->flags = 0;
Expand Down Expand Up @@ -1655,6 +1654,7 @@ int hci_register_dev(struct hci_dev *hdev)
schedule_work(&hdev->power_on);

hci_notify(hdev, HCI_DEV_REG);
__hci_dev_hold(hdev);

return id;

Expand Down

0 comments on commit 19320e5

Please sign in to comment.