From a2d1e3516c80027b2da17fb0b7ccd36f0ac33aa7 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Fri, 23 Apr 2010 16:01:18 +0100 Subject: tty: Fix regressions in the char driver conversion This forgot to update a field in the old char drivers. The fact nobody has basically noticed (except one mxser user) rather suggests most of these drivers could go into the bitbucket. Signed-off-by: Alan Cox Cc: Jiri Slaby Cc: Dan Carpenter Cc: Andreas Pretzsch Signed-off-by: Greg Kroah-Hartman --- drivers/char/isicom.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'drivers/char/isicom.c') diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index 0fa2e4a..c1ab303 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c @@ -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); } @@ -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); -- cgit v1.1