Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248669
b: refs/heads/master
c: 7fdc289
h: refs/heads/master
i:
  248667: 698ff5d
v: v3
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Apr 25, 2011
1 parent afb2e9c commit b201dfc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 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: 6d742f655efe767dc77a099b57297fa417afc473
refs/heads/master: 7fdc28931176a17ef0bdc5d35742925a155533c4
12 changes: 2 additions & 10 deletions trunk/drivers/tty/nozomi.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,6 @@ struct port {
u8 toggle_ul;
u16 token_dl;

/* mutex to ensure one access patch to this port */
struct mutex tty_sem;
wait_queue_head_t tty_wait;
struct async_icount tty_icount;

Expand Down Expand Up @@ -1474,7 +1472,6 @@ static int __devinit nozomi_card_init(struct pci_dev *pdev,
struct device *tty_dev;
struct port *port = &dc->port[i];
port->dc = dc;
mutex_init(&port->tty_sem);
tty_port_init(&port->port);
port->port.ops = &noz_tty_port_ops;
tty_dev = tty_register_device(ntty_driver, dc->index_start + i,
Expand Down Expand Up @@ -1688,8 +1685,6 @@ static int ntty_write(struct tty_struct *tty, const unsigned char *buffer,
if (!dc || !port)
return -ENODEV;

mutex_lock(&port->tty_sem);

rval = kfifo_in(&port->fifo_ul, (unsigned char *)buffer, count);

/* notify card */
Expand All @@ -1714,7 +1709,6 @@ static int ntty_write(struct tty_struct *tty, const unsigned char *buffer,
spin_unlock_irqrestore(&dc->spin_mutex, flags);

exit:
mutex_unlock(&port->tty_sem);
return rval;
}

Expand All @@ -1733,11 +1727,9 @@ static int ntty_write_room(struct tty_struct *tty)
int room = 4096;
const struct nozomi *dc = get_dc_by_tty(tty);

if (dc) {
mutex_lock(&port->tty_sem);
if (dc)
room = kfifo_avail(&port->fifo_ul);
mutex_unlock(&port->tty_sem);
}

return room;
}

Expand Down

0 comments on commit b201dfc

Please sign in to comment.