* [PATCH 1/3] tty: Fix regressions in the char driver conversion
2010-04-30 16:36 [GIT PATCH] TTY fixes for 2.6.34-git Greg KH
@ 2010-04-30 16:37 ` Greg Kroah-Hartman
2010-04-30 16:37 ` [PATCH 2/3] serial: 8250_pnp - add Fujitsu Wacom device Greg Kroah-Hartman
2010-04-30 16:37 ` [PATCH 3/3] serial: drivers/serial/pmac_zilog.c: add missing unlock Greg Kroah-Hartman
2 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2010-04-30 16:37 UTC (permalink / raw)
To: linux-kernel
Cc: Alan Cox, Jiri Slaby, Dan Carpenter, Andreas Pretzsch,
Greg Kroah-Hartman
From: Alan Cox <alan@linux.intel.com>
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 <alan@linux.intel.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Andreas Pretzsch <apr@cn-eng.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/char/isicom.c | 9 +++++++--
drivers/char/istallion.c | 2 ++
drivers/char/mxser.c | 3 ++-
drivers/char/riscom8.c | 1 +
drivers/char/stallion.c | 7 ++++---
5 files changed, 16 insertions(+), 6 deletions(-)
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);
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 4cd6c52..4e395c9 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -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);
}
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index 4702305..d2692d4 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;
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
index 0a8d1e5..b02332a 100644
--- a/drivers/char/riscom8.c
+++ b/drivers/char/riscom8.c
@@ -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);
}
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index 0e511d6..6049fd7 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);
}
--
1.7.0.4
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 2/3] serial: 8250_pnp - add Fujitsu Wacom device
2010-04-30 16:36 [GIT PATCH] TTY fixes for 2.6.34-git Greg KH
2010-04-30 16:37 ` [PATCH 1/3] tty: Fix regressions in the char driver conversion Greg Kroah-Hartman
@ 2010-04-30 16:37 ` Greg Kroah-Hartman
2010-04-30 16:37 ` [PATCH 3/3] serial: drivers/serial/pmac_zilog.c: add missing unlock Greg Kroah-Hartman
2 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2010-04-30 16:37 UTC (permalink / raw)
To: linux-kernel; +Cc: Ping Cheng, stable, Andrew Morton, Greg Kroah-Hartman
From: Ping Cheng <pingc@wacom.com>
Add Fujitsu Wacom 1FGT Tablet PC device
Signed-off-by: Ping Cheng <pingc@wacom.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/serial/8250_pnp.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c
index 24485cc..4822cb5 100644
--- a/drivers/serial/8250_pnp.c
+++ b/drivers/serial/8250_pnp.c
@@ -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)
--
1.7.0.4
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 3/3] serial: drivers/serial/pmac_zilog.c: add missing unlock
2010-04-30 16:36 [GIT PATCH] TTY fixes for 2.6.34-git Greg KH
2010-04-30 16:37 ` [PATCH 1/3] tty: Fix regressions in the char driver conversion Greg Kroah-Hartman
2010-04-30 16:37 ` [PATCH 2/3] serial: 8250_pnp - add Fujitsu Wacom device Greg Kroah-Hartman
@ 2010-04-30 16:37 ` Greg Kroah-Hartman
2 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2010-04-30 16:37 UTC (permalink / raw)
To: linux-kernel
Cc: Julia Lawall, Benjamin Herrenschmidt, Andrew Morton, Greg Kroah-Hartman
From: Julia Lawall <julia@diku.dk>
In an error handling case the lock is not unlocked.
A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@r exists@
expression E1;
identifier f;
@@
f (...) { <+...
* spin_lock_irqsave (E1,...);
... when != E1
* return ...;
...+> }
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/serial/pmac_zilog.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c
index 4eaa043..700e108 100644
--- a/drivers/serial/pmac_zilog.c
+++ b/drivers/serial/pmac_zilog.c
@@ -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]);
}
--
1.7.0.4
^ permalink raw reply [flat|nested] 4+ messages in thread