summaryrefslogtreecommitdiffstats
path: root/drivers/char/stallion.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-05-10 13:12:26 +0200
committerIngo Molnar <mingo@elte.hu>2010-05-10 13:12:29 +0200
commit7c224a03a79021ab12ce057964df9e679af5386d (patch)
tree809dbf3bcb5978e7b1845eb4c46179f1c9405f0c /drivers/char/stallion.c
parent5bdb7934ca4115a12c7d585c5a45312b1c36909b (diff)
parentb57f95a38233a2e73b679bea4a5453a1cc2a1cc9 (diff)
downloadlinux-7c224a03a79021ab12ce057964df9e679af5386d.tar.gz
linux-7c224a03a79021ab12ce057964df9e679af5386d.tar.bz2
linux-7c224a03a79021ab12ce057964df9e679af5386d.zip
Merge commit 'v2.6.34-rc7' into oprofile
Merge reason: Update to Linus's latest -rc. Signed-off-by: Ingo Molnar <mingo@elte.hu>
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);
}