Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290864
b: refs/heads/master
c: e9b9cfa
h: refs/heads/master
v: v3
  • Loading branch information
David Herrmann authored and Johan Hedberg committed Feb 13, 2012
1 parent 4868745 commit ce1acb8
Show file tree
Hide file tree
Showing 15 changed files with 4 additions and 36 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: 46e06531a5ae13c66f774d3cb1ad78385618a5a2
refs/heads/master: e9b9cfa1575e37cb2dbb5534aeaaa16814228887
2 changes: 0 additions & 2 deletions trunk/drivers/bluetooth/bfusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,6 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
hdev->send = bfusb_send_frame;
hdev->ioctl = bfusb_ioctl;

hdev->owner = THIS_MODULE;

if (hci_register_dev(hdev) < 0) {
BT_ERR("Can't register HCI device");
hci_free_dev(hdev);
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/bluetooth/bluecard_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,6 @@ static int bluecard_open(bluecard_info_t *info)
hdev->send = bluecard_hci_send_frame;
hdev->ioctl = bluecard_hci_ioctl;

hdev->owner = THIS_MODULE;

id = inb(iobase + 0x30);

if ((id & 0x0f) == 0x02)
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/bluetooth/bpa10x.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,6 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id *
hdev->flush = bpa10x_flush;
hdev->send = bpa10x_send_frame;

hdev->owner = THIS_MODULE;

set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks);

err = hci_register_dev(hdev);
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/bluetooth/bt3c_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,6 @@ static int bt3c_open(bt3c_info_t *info)
hdev->send = bt3c_hci_send_frame;
hdev->ioctl = bt3c_hci_ioctl;

hdev->owner = THIS_MODULE;

/* Load firmware */
err = request_firmware(&firmware, "BT3CPCC.bin", &info->p_dev->dev);
if (err < 0) {
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/bluetooth/btmrvl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,6 @@ int btmrvl_register_hdev(struct btmrvl_private *priv)
hdev->flush = btmrvl_flush;
hdev->send = btmrvl_send_frame;
hdev->ioctl = btmrvl_ioctl;
hdev->owner = THIS_MODULE;

btmrvl_send_module_cfg_cmd(priv, MODULE_BRINGUP_REQ);

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/bluetooth/btsdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,6 @@ static int btsdio_probe(struct sdio_func *func,
hdev->flush = btsdio_flush;
hdev->send = btsdio_send_frame;

hdev->owner = THIS_MODULE;

err = hci_register_dev(hdev);
if (err < 0) {
hci_free_dev(hdev);
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/bluetooth/btuart_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,6 @@ static int btuart_open(btuart_info_t *info)
hdev->send = btuart_hci_send_frame;
hdev->ioctl = btuart_hci_ioctl;

hdev->owner = THIS_MODULE;

spin_lock_irqsave(&(info->lock), flags);

/* Reset UART */
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,8 +997,6 @@ static int btusb_probe(struct usb_interface *intf,
hdev->send = btusb_send_frame;
hdev->notify = btusb_notify;

hdev->owner = THIS_MODULE;

/* Interface numbers are hardcoded in the specification */
data->isoc = usb_ifnum_to_if(data->udev, 1);

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/bluetooth/btwilink.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ static int bt_ti_probe(struct platform_device *pdev)
hdev->close = ti_st_close;
hdev->flush = NULL;
hdev->send = ti_st_send_frame;
hdev->owner = THIS_MODULE;

err = hci_register_dev(hdev);
if (err < 0) {
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/bluetooth/dtl1_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,6 @@ static int dtl1_open(dtl1_info_t *info)
hdev->send = dtl1_hci_send_frame;
hdev->ioctl = dtl1_hci_ioctl;

hdev->owner = THIS_MODULE;

spin_lock_irqsave(&(info->lock), flags);

/* Reset UART */
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/bluetooth/hci_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,6 @@ static int hci_uart_register_dev(struct hci_uart *hu)
hdev->send = hci_uart_send_frame;
hdev->parent = hu->tty->dev;

hdev->owner = THIS_MODULE;

if (!reset)
set_bit(HCI_QUIRK_NO_RESET, &hdev->quirks);

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/bluetooth/hci_vhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ static int vhci_open(struct inode *inode, struct file *file)
hdev->flush = vhci_flush;
hdev->send = vhci_send_frame;

hdev->owner = THIS_MODULE;

if (hci_register_dev(hdev) < 0) {
BT_ERR("Can't register HCI device");
kfree(data);
Expand Down
13 changes: 2 additions & 11 deletions trunk/include/net/bluetooth/hci_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,6 @@ struct hci_dev {

struct rfkill *rfkill;

struct module *owner;

unsigned long dev_flags;

int (*open)(struct hci_dev *hdev);
Expand Down Expand Up @@ -601,22 +599,15 @@ static inline void __hci_dev_put(struct hci_dev *d)
* 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) \
do { \
__hci_dev_put(d); \
module_put(d->owner); \
} while (0)
#define hci_dev_put(d) __hci_dev_put(d)

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

#define hci_dev_hold(d) \
({ \
try_module_get(d->owner) ? __hci_dev_hold(d) : NULL; \
})
#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
3 changes: 1 addition & 2 deletions trunk/net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1548,8 +1548,7 @@ int hci_register_dev(struct hci_dev *hdev)
struct list_head *head = &hci_dev_list, *p;
int i, id, error;

BT_DBG("%p name %s bus %d owner %p", hdev, hdev->name,
hdev->bus, hdev->owner);
BT_DBG("%p name %s bus %d", hdev, hdev->name, hdev->bus);

if (!hdev->open || !hdev->close)
return -EINVAL;
Expand Down

0 comments on commit ce1acb8

Please sign in to comment.