ttydev: fix pamc_zilog for tty pointer move
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 16 Jul 2008 20:54:11 +0000 (21:54 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 21 Jul 2008 00:12:35 +0000 (17:12 -0700)
Today's linux-next build (sparc64 defconfig) failed like this:

drivers/serial/sunhv.c: In function `receive_chars':
drivers/serial/sunhv.c:188: error: structure has no member named `tty'
drivers/serial/sunsu.c: In function `receive_chars':
drivers/serial/sunsu.c:314: error: structure has no member named `tty'
drivers/serial/sunsab.c: In function `receive_chars':
drivers/serial/sunsab.c:121: error: structure has no member named `tty'

I applied the following patch (which, again, may not be correct).

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/serial/sunhv.c
drivers/serial/sunsab.c
drivers/serial/sunsu.c
drivers/serial/sunzilog.c

index 2847336742d77e4ef1ab7cf66980cb7f50393154..aeeec5588afd48c2573097417f6fc428d0f6b39d 100644 (file)
@@ -185,7 +185,7 @@ static struct tty_struct *receive_chars(struct uart_port *port)
        struct tty_struct *tty = NULL;
 
        if (port->info != NULL)         /* Unopened serial console */
-               tty = port->info->tty;
+               tty = port->info->port.tty;
 
        if (sunhv_ops->receive_chars(port, tty))
                sun_do_break();
index 9ff5b38f3bee9e5ac3aedf0740c2bd4ca71bff9d..15ee497e1c78805e3030cd41f383864070884980 100644 (file)
@@ -118,7 +118,7 @@ receive_chars(struct uart_sunsab_port *up,
        int i;
 
        if (up->port.info != NULL)              /* Unopened serial console */
-               tty = up->port.info->tty;
+               tty = up->port.info->port.tty;
 
        /* Read number of BYTES (Character + Status) available. */
        if (stat->sreg.isr0 & SAB82532_ISR0_RPF) {
index 1074e73d7433a0db2ea0d07749c2ac9db4767fee..e24e68235088855c719c629f37a020f5d78d0e54 100644 (file)
@@ -311,7 +311,7 @@ static void sunsu_enable_ms(struct uart_port *port)
 static struct tty_struct *
 receive_chars(struct uart_sunsu_port *up, unsigned char *status)
 {
-       struct tty_struct *tty = up->port.info->tty;
+       struct tty_struct *tty = up->port.info->port.tty;
        unsigned char ch, flag;
        int max_count = 256;
        int saw_console_brk = 0;
index 7e9fa5ef0eb72c3a90a51871c584ac134efd2ed2..0f3d69b86d6795de97bc81239d20fb78cbb920e9 100644 (file)
@@ -329,8 +329,8 @@ sunzilog_receive_chars(struct uart_sunzilog_port *up,
 
        tty = NULL;
        if (up->port.info != NULL &&            /* Unopened serial console */
-           up->port.info->tty != NULL)         /* Keyboard || mouse */
-               tty = up->port.info->tty;
+           up->port.info->port.tty != NULL)    /* Keyboard || mouse */
+               tty = up->port.info->port.tty;
 
        for (;;) {