Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284310
b: refs/heads/master
c: 393432c
h: refs/heads/master
v: v3
  • Loading branch information
Gustavo F. Padovan committed Jan 3, 2012
1 parent 1128905 commit 4323d63
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 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: 95ca83f42fb5f5bf789b514635f79242afe555d1
refs/heads/master: 393432cd8dc02b88a00decd495913643aa5ff705
22 changes: 11 additions & 11 deletions trunk/net/bluetooth/rfcomm/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct rfcomm_dev {
};

static LIST_HEAD(rfcomm_dev_list);
static DEFINE_RWLOCK(rfcomm_dev_lock);
static DEFINE_SPINLOCK(rfcomm_dev_lock);

static void rfcomm_dev_data_ready(struct rfcomm_dlc *dlc, struct sk_buff *skb);
static void rfcomm_dev_state_change(struct rfcomm_dlc *dlc, int err);
Expand Down Expand Up @@ -146,7 +146,7 @@ static inline struct rfcomm_dev *rfcomm_dev_get(int id)
{
struct rfcomm_dev *dev;

read_lock(&rfcomm_dev_lock);
spin_lock(&rfcomm_dev_lock);

dev = __rfcomm_dev_get(id);

Expand All @@ -157,7 +157,7 @@ static inline struct rfcomm_dev *rfcomm_dev_get(int id)
rfcomm_dev_hold(dev);
}

read_unlock(&rfcomm_dev_lock);
spin_unlock(&rfcomm_dev_lock);

return dev;
}
Expand Down Expand Up @@ -205,7 +205,7 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
if (!dev)
return -ENOMEM;

write_lock_bh(&rfcomm_dev_lock);
spin_lock(&rfcomm_dev_lock);

if (req->dev_id < 0) {
dev->id = 0;
Expand Down Expand Up @@ -290,7 +290,7 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
__module_get(THIS_MODULE);

out:
write_unlock_bh(&rfcomm_dev_lock);
spin_unlock(&rfcomm_dev_lock);

if (err < 0)
goto free;
Expand Down Expand Up @@ -327,9 +327,9 @@ static void rfcomm_dev_del(struct rfcomm_dev *dev)
if (atomic_read(&dev->opened) > 0)
return;

write_lock_bh(&rfcomm_dev_lock);
spin_lock(&rfcomm_dev_lock);
list_del_init(&dev->list);
write_unlock_bh(&rfcomm_dev_lock);
spin_unlock(&rfcomm_dev_lock);

rfcomm_dev_put(dev);
}
Expand Down Expand Up @@ -473,7 +473,7 @@ static int rfcomm_get_dev_list(void __user *arg)

di = dl->dev_info;

read_lock_bh(&rfcomm_dev_lock);
spin_lock(&rfcomm_dev_lock);

list_for_each_entry(dev, &rfcomm_dev_list, list) {
if (test_bit(RFCOMM_TTY_RELEASED, &dev->flags))
Expand All @@ -488,7 +488,7 @@ static int rfcomm_get_dev_list(void __user *arg)
break;
}

read_unlock_bh(&rfcomm_dev_lock);
spin_unlock(&rfcomm_dev_lock);

dl->dev_num = n;
size = sizeof(*dl) + n * sizeof(*di);
Expand Down Expand Up @@ -766,9 +766,9 @@ static void rfcomm_tty_close(struct tty_struct *tty, struct file *filp)
rfcomm_dlc_unlock(dev->dlc);

if (test_bit(RFCOMM_TTY_RELEASED, &dev->flags)) {
write_lock_bh(&rfcomm_dev_lock);
spin_lock(&rfcomm_dev_lock);
list_del_init(&dev->list);
write_unlock_bh(&rfcomm_dev_lock);
spin_unlock(&rfcomm_dev_lock);

rfcomm_dev_put(dev);
}
Expand Down

0 comments on commit 4323d63

Please sign in to comment.