Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290866
b: refs/heads/master
c: dc946bd
h: refs/heads/master
v: v3
  • Loading branch information
David Herrmann authored and Johan Hedberg committed Feb 13, 2012
1 parent 19320e5 commit 384e81b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 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: 4c724c7135ca2b407bd318b4267456a7b5723825
refs/heads/master: dc946bd86f725c42c3ab1caf9966d29f5b364fea
4 changes: 2 additions & 2 deletions trunk/drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ static void btusb_disconnect(struct usb_interface *intf)

hdev = data->hdev;

__hci_dev_hold(hdev);
hci_dev_hold(hdev);

usb_set_intfdata(data->intf, NULL);

Expand All @@ -1093,7 +1093,7 @@ static void btusb_disconnect(struct usb_interface *intf)
else if (data->isoc)
usb_driver_release_interface(&btusb_driver, data->isoc);

__hci_dev_put(hdev);
hci_dev_put(hdev);

hci_free_dev(hdev);
kfree(data);
Expand Down
12 changes: 2 additions & 10 deletions trunk/include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -589,25 +589,17 @@ static inline void hci_conn_put(struct hci_conn *conn)
}

/* ----- HCI Devices ----- */
static inline void __hci_dev_put(struct hci_dev *d)
static inline void hci_dev_put(struct hci_dev *d)
{
put_device(&d->dev);
}

/*
* hci_dev_put and hci_dev_hold are macros to avoid dragging all the
* overhead of all the modular infrastructure into this header.
*/
#define hci_dev_put(d) __hci_dev_put(d)

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

#define hci_dev_hold(d) __hci_dev_hold(d)

#define hci_dev_lock(d) mutex_lock(&d->lock)
#define hci_dev_unlock(d) mutex_unlock(&d->lock)

Expand Down
4 changes: 2 additions & 2 deletions trunk/net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1654,7 +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);
hci_dev_hold(hdev);

return id;

Expand Down Expand Up @@ -1717,7 +1717,7 @@ void hci_unregister_dev(struct hci_dev *hdev)
hci_adv_entries_clear(hdev);
hci_dev_unlock(hdev);

__hci_dev_put(hdev);
hci_dev_put(hdev);
}
EXPORT_SYMBOL(hci_unregister_dev);

Expand Down

0 comments on commit 384e81b

Please sign in to comment.