summaryrefslogtreecommitdiffstats
path: root/drivers/char/stallion.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-05-20 11:07:23 -0700
committerTony Lindgren <tony@atomide.com>2010-05-20 11:07:23 -0700
commitdf760137ad3cbfa15ceed42478f81bff01b6e799 (patch)
treebe939c9d11094858d74141a4c62cb23f477754d8 /drivers/char/stallion.c
parent754b8e653412106ff613f4750b197f807fcd8347 (diff)
parentde997718b64df2f766736f23f8557da450b83a25 (diff)
downloadblackbird-op-linux-df760137ad3cbfa15ceed42478f81bff01b6e799.tar.gz
blackbird-op-linux-df760137ad3cbfa15ceed42478f81bff01b6e799.zip
Merge branch 'omap-boards' into omap-for-linus
Diffstat (limited to 'drivers/char/stallion.c')
-rw-r--r--drivers/char/stallion.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index 0e511d61f544..6049fd731924 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -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;
@@ -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);
}
@@ -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);
}
OpenPOWER on IntegriCloud