Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163830
b: refs/heads/master
c: 6f6412b
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Live-CD User committed Sep 19, 2009
1 parent 60a357a commit 5679043
Show file tree
Hide file tree
Showing 2 changed files with 15 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: 1e2b025453d45d35b07d8105bea7fc9d339ff562
refs/heads/master: 6f6412b4c76441f2060e580b8d5cbda07dabde37
25 changes: 14 additions & 11 deletions trunk/drivers/char/isicom.c
Original file line number Diff line number Diff line change
Expand Up @@ -952,19 +952,12 @@ static void isicom_flush_buffer(struct tty_struct *tty)
tty_wakeup(tty);
}

static void isicom_close(struct tty_struct *tty, struct file *filp)
static void isicom_close_port(struct tty_port *port)
{
struct isi_port *ip = tty->driver_data;
struct tty_port *port = &ip->port;
struct isi_board *card;
struct isi_port *ip = container_of(port, struct isi_port, port);
struct isi_board *card = ip->card;
unsigned long flags;

BUG_ON(!ip);

card = ip->card;
if (isicom_paranoia_check(ip, tty->name, "isicom_close"))
return;

/* indicate to the card that no more data can be received
on this port */
spin_lock_irqsave(&card->card_lock, flags);
Expand All @@ -974,9 +967,19 @@ static void isicom_close(struct tty_struct *tty, struct file *filp)
}
isicom_shutdown_port(ip);
spin_unlock_irqrestore(&card->card_lock, flags);
}

static void isicom_close(struct tty_struct *tty, struct file *filp)
{
struct isi_port *ip = tty->driver_data;
struct tty_port *port = &ip->port;
if (isicom_paranoia_check(ip, tty->name, "isicom_close"))
return;

if (tty_port_close_start(port, tty, filp) == 0)
return;
isicom_close_port(port);
isicom_flush_buffer(tty);

tty_port_close_end(port, tty);
}

Expand Down

0 comments on commit 5679043

Please sign in to comment.