Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304181
b: refs/heads/master
c: b2c4be3
h: refs/heads/master
i:
  304179: 1dda75a
v: v3
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Apr 9, 2012
1 parent d801c0d commit 8b45451
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 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: 67054019289ff11a7ffbc1a5d3c95aeb36e2f03e
refs/heads/master: b2c4be398bf771a09f84eae6cf12cbd685384b8d
22 changes: 3 additions & 19 deletions trunk/net/bluetooth/rfcomm/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ struct rfcomm_dev {

struct rfcomm_dlc *dlc;
wait_queue_head_t wait;
struct work_struct wakeup_task;

struct device *tty_dev;

Expand All @@ -81,8 +80,6 @@ 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);
static void rfcomm_dev_modem_status(struct rfcomm_dlc *dlc, u8 v24_sig);

static void rfcomm_tty_wakeup(struct work_struct *work);

/* ---- Device functions ---- */

/*
Expand Down Expand Up @@ -248,7 +245,6 @@ static int rfcomm_dev_add(struct rfcomm_dev_req *req, struct rfcomm_dlc *dlc)
tty_port_init(&dev->port);
dev->port.ops = &rfcomm_port_ops;
init_waitqueue_head(&dev->wait);
INIT_WORK(&dev->wakeup_task, rfcomm_tty_wakeup);

skb_queue_head_init(&dev->pending);

Expand Down Expand Up @@ -340,9 +336,10 @@ static inline unsigned int rfcomm_room(struct rfcomm_dlc *dlc)
static void rfcomm_wfree(struct sk_buff *skb)
{
struct rfcomm_dev *dev = (void *) skb->sk;
struct tty_struct *tty = dev->port.tty;
atomic_sub(skb->truesize, &dev->wmem_alloc);
if (test_bit(RFCOMM_TTY_ATTACHED, &dev->flags))
queue_work(system_nrt_wq, &dev->wakeup_task);
if (test_bit(RFCOMM_TTY_ATTACHED, &dev->flags) && tty)
tty_wakeup(tty);
tty_port_put(&dev->port);
}

Expand Down Expand Up @@ -625,18 +622,6 @@ static void rfcomm_dev_modem_status(struct rfcomm_dlc *dlc, u8 v24_sig)
}

/* ---- TTY functions ---- */
static void rfcomm_tty_wakeup(struct work_struct *work)
{
struct rfcomm_dev *dev = container_of(work, struct rfcomm_dev,
wakeup_task);
struct tty_struct *tty = dev->port.tty;
if (!tty)
return;

BT_DBG("dev %p tty %p", dev, tty);
tty_wakeup(tty);
}

static void rfcomm_tty_copy_pending(struct rfcomm_dev *dev)
{
struct tty_struct *tty = dev->port.tty;
Expand Down Expand Up @@ -753,7 +738,6 @@ static void rfcomm_tty_close(struct tty_struct *tty, struct file *filp)
rfcomm_dlc_close(dev->dlc, 0);

clear_bit(RFCOMM_TTY_ATTACHED, &dev->flags);
cancel_work_sync(&dev->wakeup_task);

rfcomm_dlc_lock(dev->dlc);
tty->driver_data = NULL;
Expand Down

0 comments on commit 8b45451

Please sign in to comment.