Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361040
b: refs/heads/master
c: a4ed2e7
h: refs/heads/master
v: v3
  • Loading branch information
Peter Hurley authored and David S. Miller committed Mar 6, 2013
1 parent 277a5a2 commit 789e759
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 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: 0305d0689efd35b4c9f88bb560c104ed118d2277
refs/heads/master: a4ed2e737cb73e4405a3649f8aef7619b99fecae
14 changes: 5 additions & 9 deletions trunk/net/irda/ircomm/ircomm_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
struct tty_port *port = &self->port;
DECLARE_WAITQUEUE(wait, current);
int retval;
int do_clocal = 0, extra_count = 0;
int do_clocal = 0;
unsigned long flags;

IRDA_DEBUG(2, "%s()\n", __func__ );
Expand Down Expand Up @@ -315,10 +315,8 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
__FILE__, __LINE__, tty->driver->name, port->count);

spin_lock_irqsave(&port->lock, flags);
if (!tty_hung_up_p(filp)) {
extra_count = 1;
if (!tty_hung_up_p(filp))
port->count--;
}
spin_unlock_irqrestore(&port->lock, flags);
port->blocked_open++;

Expand Down Expand Up @@ -361,12 +359,10 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
__set_current_state(TASK_RUNNING);
remove_wait_queue(&port->open_wait, &wait);

if (extra_count) {
/* ++ is not atomic, so this should be protected - Jean II */
spin_lock_irqsave(&port->lock, flags);
spin_lock_irqsave(&port->lock, flags);
if (!tty_hung_up_p(filp))
port->count++;
spin_unlock_irqrestore(&port->lock, flags);
}
spin_unlock_irqrestore(&port->lock, flags);
port->blocked_open--;

IRDA_DEBUG(1, "%s(%d):block_til_ready after blocking on %s open_count=%d\n",
Expand Down

0 comments on commit 789e759

Please sign in to comment.