Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  serial: drivers/serial/pmac_zilog.c: add missing unlock
  serial: 8250_pnp - add Fujitsu Wacom device
  tty: Fix regressions in the char driver conversion
  • Loading branch information
Linus Torvalds committed Apr 30, 2010
2 parents e4049eb + c61fae9 commit 87156d6
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 7 deletions.
9 changes: 7 additions & 2 deletions drivers/char/isicom.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,8 +879,8 @@ static int isicom_open(struct tty_struct *tty, struct file *filp)
if (tport == NULL)
return -ENODEV;
port = container_of(tport, struct isi_port, port);
card = &isi_card[BOARD(tty->index)];

tty->driver_data = port;
return tty_port_open(tport, tty, filp);
}

Expand Down Expand Up @@ -936,7 +936,12 @@ static void isicom_shutdown(struct tty_port *port)
static void isicom_close(struct tty_struct *tty, struct file *filp)
{
struct isi_port *ip = tty->driver_data;
struct tty_port *port = &ip->port;
struct tty_port *port;

if (ip == NULL)
return;

port = &ip->port;
if (isicom_paranoia_check(ip, tty->name, "isicom_close"))
return;
tty_port_close(port, tty, filp);
Expand Down
2 changes: 2 additions & 0 deletions drivers/char/istallion.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,8 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
return -ENODEV;
if (portp->devnr < 1)
return -ENODEV;

tty->driver_data = portp;
return tty_port_open(&portp->port, tty, filp);
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/char/mxser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,7 @@ static int mxser_open(struct tty_struct *tty, struct file *filp)
if (!info->ioaddr)
return -ENODEV;

tty->driver_data = info;
return tty_port_open(&info->port, tty, filp);
}

Expand Down Expand Up @@ -1074,7 +1075,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
struct mxser_port *info = tty->driver_data;
struct tty_port *port = &info->port;

if (tty->index == MXSER_PORTS)
if (tty->index == MXSER_PORTS || info == NULL)
return;
if (tty_port_close_start(port, tty, filp) == 0)
return;
Expand Down
1 change: 1 addition & 0 deletions drivers/char/riscom8.c
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,7 @@ static int rc_open(struct tty_struct *tty, struct file *filp)
if (error)
return error;

tty->driver_data = port;
return tty_port_open(&port->port, tty, filp);
}

Expand Down
7 changes: 4 additions & 3 deletions drivers/char/stallion.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,6 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
{
struct stlport *portp;
struct stlbrd *brdp;
struct tty_port *port;
unsigned int minordev, brdnr, panelnr;
int portnr;

Expand Down Expand Up @@ -754,7 +753,8 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
portp = brdp->panels[panelnr]->ports[portnr];
if (portp == NULL)
return -ENODEV;
port = &portp->port;

tty->driver_data = portp;
return tty_port_open(&portp->port, tty, filp);

}
Expand Down Expand Up @@ -841,7 +841,8 @@ static void stl_close(struct tty_struct *tty, struct file *filp)
pr_debug("stl_close(tty=%p,filp=%p)\n", tty, filp);

portp = tty->driver_data;
BUG_ON(portp == NULL);
if(portp == NULL)
return;
tty_port_close(&portp->port, tty, filp);
}

Expand Down
2 changes: 2 additions & 0 deletions drivers/serial/8250_pnp.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ static const struct pnp_device_id pnp_dev_table[] = {
{ "FUJ02E6", 0 },
/* Fujitsu Wacom 2FGT Tablet PC device */
{ "FUJ02E7", 0 },
/* Fujitsu Wacom 1FGT Tablet PC device */
{ "FUJ02E9", 0 },
/*
* LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6 in
* disguise)
Expand Down
4 changes: 3 additions & 1 deletion drivers/serial/pmac_zilog.c
Original file line number Diff line number Diff line change
Expand Up @@ -752,8 +752,10 @@ static void pmz_break_ctl(struct uart_port *port, int break_state)
uap->curregs[R5] = new_reg;

/* NOTE: Not subject to 'transmitter active' rule. */
if (ZS_IS_ASLEEP(uap))
if (ZS_IS_ASLEEP(uap)) {
spin_unlock_irqrestore(&port->lock, flags);
return;
}
write_zsreg(uap, R5, uap->curregs[R5]);
}

Expand Down

0 comments on commit 87156d6

Please sign in to comment.