Skip to content

Commit 87156d6

Browse files
committed
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
2 parents e4049eb + c61fae9 commit 87156d6

File tree

7 files changed

+21
-7
lines changed

7 files changed

+21
-7
lines changed

drivers/char/isicom.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -879,8 +879,8 @@ static int isicom_open(struct tty_struct *tty, struct file *filp)
879879
if (tport == NULL)
880880
return -ENODEV;
881881
port = container_of(tport, struct isi_port, port);
882-
card = &isi_card[BOARD(tty->index)];
883882

883+
tty->driver_data = port;
884884
return tty_port_open(tport, tty, filp);
885885
}
886886

@@ -936,7 +936,12 @@ static void isicom_shutdown(struct tty_port *port)
936936
static void isicom_close(struct tty_struct *tty, struct file *filp)
937937
{
938938
struct isi_port *ip = tty->driver_data;
939-
struct tty_port *port = &ip->port;
939+
struct tty_port *port;
940+
941+
if (ip == NULL)
942+
return;
943+
944+
port = &ip->port;
940945
if (isicom_paranoia_check(ip, tty->name, "isicom_close"))
941946
return;
942947
tty_port_close(port, tty, filp);

drivers/char/istallion.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,8 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
827827
return -ENODEV;
828828
if (portp->devnr < 1)
829829
return -ENODEV;
830+
831+
tty->driver_data = portp;
830832
return tty_port_open(&portp->port, tty, filp);
831833
}
832834

drivers/char/mxser.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,7 @@ static int mxser_open(struct tty_struct *tty, struct file *filp)
10111011
if (!info->ioaddr)
10121012
return -ENODEV;
10131013

1014+
tty->driver_data = info;
10141015
return tty_port_open(&info->port, tty, filp);
10151016
}
10161017

@@ -1074,7 +1075,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
10741075
struct mxser_port *info = tty->driver_data;
10751076
struct tty_port *port = &info->port;
10761077

1077-
if (tty->index == MXSER_PORTS)
1078+
if (tty->index == MXSER_PORTS || info == NULL)
10781079
return;
10791080
if (tty_port_close_start(port, tty, filp) == 0)
10801081
return;

drivers/char/riscom8.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,7 @@ static int rc_open(struct tty_struct *tty, struct file *filp)
909909
if (error)
910910
return error;
911911

912+
tty->driver_data = port;
912913
return tty_port_open(&port->port, tty, filp);
913914
}
914915

drivers/char/stallion.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,6 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
724724
{
725725
struct stlport *portp;
726726
struct stlbrd *brdp;
727-
struct tty_port *port;
728727
unsigned int minordev, brdnr, panelnr;
729728
int portnr;
730729

@@ -754,7 +753,8 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
754753
portp = brdp->panels[panelnr]->ports[portnr];
755754
if (portp == NULL)
756755
return -ENODEV;
757-
port = &portp->port;
756+
757+
tty->driver_data = portp;
758758
return tty_port_open(&portp->port, tty, filp);
759759

760760
}
@@ -841,7 +841,8 @@ static void stl_close(struct tty_struct *tty, struct file *filp)
841841
pr_debug("stl_close(tty=%p,filp=%p)\n", tty, filp);
842842

843843
portp = tty->driver_data;
844-
BUG_ON(portp == NULL);
844+
if(portp == NULL)
845+
return;
845846
tty_port_close(&portp->port, tty, filp);
846847
}
847848

drivers/serial/8250_pnp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,8 @@ static const struct pnp_device_id pnp_dev_table[] = {
348348
{ "FUJ02E6", 0 },
349349
/* Fujitsu Wacom 2FGT Tablet PC device */
350350
{ "FUJ02E7", 0 },
351+
/* Fujitsu Wacom 1FGT Tablet PC device */
352+
{ "FUJ02E9", 0 },
351353
/*
352354
* LG C1 EXPRESS DUAL (C1-PB11A3) touch screen (actually a FUJ02E6 in
353355
* disguise)

drivers/serial/pmac_zilog.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,10 @@ static void pmz_break_ctl(struct uart_port *port, int break_state)
752752
uap->curregs[R5] = new_reg;
753753

754754
/* NOTE: Not subject to 'transmitter active' rule. */
755-
if (ZS_IS_ASLEEP(uap))
755+
if (ZS_IS_ASLEEP(uap)) {
756+
spin_unlock_irqrestore(&port->lock, flags);
756757
return;
758+
}
757759
write_zsreg(uap, R5, uap->curregs[R5]);
758760
}
759761

0 commit comments

Comments
 (0)