diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-30 10:16:42 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-04-30 10:16:42 -0700 |
commit | 87156d692afdc4c689e99380a263445217a4b76c (patch) | |
tree | 918cd55f9338626c2d354cfe8b6a66e451fedf99 /drivers/char/mxser.c | |
parent | e4049eb8527668a6c7f97b944970b81d1316d5b0 (diff) | |
parent | c61fae964a5ee04c4e4a01caecaf778c2e26e589 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* 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
Diffstat (limited to 'drivers/char/mxser.c')
-rw-r--r-- | drivers/char/mxser.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c index 47023053ee8..d2692d443f7 100644 --- a/drivers/char/mxser.c +++ b/drivers/char/mxser.c @@ -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); } @@ -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; |