]> git.hungrycats.org Git - linux/commitdiff
[PATCH] tty cleanups (2/12)
authorAlexander Viro <viro@www.linux.org.uk>
Wed, 23 Apr 2003 11:18:18 +0000 (04:18 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 23 Apr 2003 11:18:18 +0000 (04:18 -0700)
Instead of copying tty_driver into tty_struct we put a reference
in there.  tty->driver turned into a pointer, users updated.  Large, but
trivial

78 files changed:
arch/cris/drivers/serial.c
arch/ia64/hp/sim/simserial.c
arch/mips/au1000/common/serial.c
arch/mips/baget/vacserial.c
arch/mips/kernel/irixioctl.c
arch/parisc/kernel/ioctl32.c
arch/ppc/4xx_io/serial_sicc.c
arch/ppc/8260_io/uart.c
arch/ppc/8xx_io/uart.c
arch/ppc64/kernel/ioctl32.c
arch/sparc64/kernel/ioctl32.c
arch/um/drivers/line.c
arch/x86_64/ia32/ia32_ioctl.c
drivers/bluetooth/hci_ldisc.c
drivers/char/amiserial.c
drivers/char/cyclades.c
drivers/char/dz.c
drivers/char/epca.c
drivers/char/esp.c
drivers/char/generic_serial.c
drivers/char/hvc_console.c
drivers/char/ip2main.c
drivers/char/isicom.c
drivers/char/istallion.c
drivers/char/keyboard.c
drivers/char/moxa.c
drivers/char/mxser.c
drivers/char/n_hdlc.c
drivers/char/n_r3964.c
drivers/char/n_tty.c
drivers/char/pcmcia/synclink_cs.c
drivers/char/pcxx.c
drivers/char/pty.c
drivers/char/riscom8.c
drivers/char/rocket.c
drivers/char/ser_a2232.c
drivers/char/serial167.c
drivers/char/serial_tx3912.c
drivers/char/sh-sci.c
drivers/char/specialix.c
drivers/char/stallion.c
drivers/char/sx.c
drivers/char/synclink.c
drivers/char/synclinkmp.c
drivers/char/tty_io.c
drivers/char/tty_ioctl.c
drivers/char/vme_scc.c
drivers/char/vt.c
drivers/input/serio/serport.c
drivers/isdn/i4l/isdn_tty.c
drivers/macintosh/macserial.c
drivers/net/hamradio/6pack.c
drivers/net/hamradio/mkiss.c
drivers/net/irda/irtty-sir.c
drivers/net/irda/irtty.c
drivers/net/ppp_async.c
drivers/net/ppp_synctty.c
drivers/net/slip.c
drivers/net/wan/pc300_tty.c
drivers/net/wan/sdla_chdlc.c
drivers/net/wan/x25_asy.c
drivers/net/wireless/strip.c
drivers/s390/char/con3215.c
drivers/s390/net/ctctty.c
drivers/sbus/char/aurora.c
drivers/serial/68328serial.c
drivers/serial/68360serial.c
drivers/serial/core.c
drivers/serial/mcfserial.c
drivers/sgi/char/sgiserial.c
drivers/tc/zs.c
drivers/usb/serial/digi_acceleport.c
drivers/usb/serial/whiteheat.c
include/linux/tty.h
kernel/printk.c
net/bluetooth/rfcomm/tty.c
net/bridge/netfilter/ebtables.c
net/irda/ircomm/ircomm_tty.c

index 5fb7b45d0e94f87b7aad8e789d8a74fa86806458..adf717dce819aa5b4553d58334708b4703269881 100644 (file)
@@ -1402,7 +1402,7 @@ receive_chars(struct e100_serial *info)
 
        if (!E100_RTS_GET(info) &&
            CIRC_SPACE(info->recv.head, info->recv.tail, SERIAL_RECV_SIZE) < TTY_THROTTLE_LIMIT)
-               info->tty->driver.throttle(info->tty);
+               info->tty->driver->throttle(info->tty);
        
        START_FLUSH_FAST_TIMER(info, "receive_chars");
 
@@ -1658,7 +1658,7 @@ flush_to_flip_buffer(struct e100_serial *info)
        /* unthrottle if we have throttled */
        if (E100_RTS_GET(info) &&
            CIRC_SPACE(info->recv.head, info->recv.tail, SERIAL_RECV_SIZE) > TTY_THROTTLE_LIMIT)
-               tty->driver.unthrottle(info->tty);
+               tty->driver->unthrottle(info->tty);
 }
 
 static _INLINE_ void
@@ -3049,8 +3049,8 @@ rs_close(struct tty_struct *tty, struct file * filp)
 #endif
 
        shutdown(info);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
@@ -3169,7 +3169,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & ASYNC_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -3289,7 +3289,7 @@ rs_open(struct tty_struct *tty, struct file * filp)
 
        /* find which port we want to open */
 
-       line = MINOR(tty->device) - tty->driver.minor_start;
+       line = MINOR(tty->device) - tty->driver->minor_start;
   
        if (line < 0 || line >= NR_PORTS)
                return -ENODEV;
@@ -3303,7 +3303,7 @@ rs_open(struct tty_struct *tty, struct file * filp)
   
 #ifdef SERIAL_DEBUG_OPEN
        printk("[%d] rs_open %s%d, count = %d\n", current->pid,
-              tty->driver.name, info->line,
+              tty->driver->name, info->line,
               info->count);
 #endif
 
@@ -3359,7 +3359,7 @@ rs_open(struct tty_struct *tty, struct file * filp)
        }
 
        if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->normal_termios;
                else 
                        *tty->termios = info->callout_termios;
index f5cedfd3a10b6bc3b7e4d70ac8f989263eb4909a..dd723bf24654135860f8538a8c57c20c82e13d2a 100644 (file)
@@ -676,7 +676,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
         * the line discipline to only process XON/XOFF characters.
         */
        shutdown(info);
-       if (tty->driver.flush_buffer) tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer) tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer) tty->ldisc.flush_buffer(tty);
        info->event = 0;
        info->tty = 0;
@@ -879,7 +879,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
        unsigned long           page;
 
        MOD_INC_USE_COUNT;
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= NR_PORTS)) {
                MOD_DEC_USE_COUNT;
                return -ENODEV;
@@ -893,7 +893,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
        info->tty = tty;
 
 #ifdef SIMSERIAL_DEBUG
-       printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
+       printk("rs_open %s%d, count = %d\n", tty->driver->name, info->line,
               info->state->count);
 #endif
        info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
@@ -937,7 +937,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
 
        if ((info->state->count == 1) &&
            (info->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->state->normal_termios;
                else
                        *tty->termios = info->state->callout_termios;
index 8d5d14db8667c58d5f78186420933301361b1c41..d2d1eb2280d8f8b780c844bc99e13c1e12783b22 100644 (file)
@@ -1962,8 +1962,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
                rs_wait_until_sent(tty, info->timeout);
        }
        shutdown(info);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
@@ -2105,7 +2105,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & ASYNC_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -2264,7 +2264,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
        unsigned long           page;
 
        MOD_INC_USE_COUNT;
-       line = MINOR(tty->device) - tty->driver.minor_start;
+       line = MINOR(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= NR_PORTS)) {
                MOD_DEC_USE_COUNT;
                return -ENODEV;
@@ -2282,7 +2282,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
        }
 
 #ifdef SERIAL_DEBUG_OPEN
-       printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
+       printk("rs_open %s%d, count = %d\n", tty->driver->name, info->line,
               info->state->count);
 #endif
        info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
@@ -2336,7 +2336,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
 
        if ((info->state->count == 1) &&
            (info->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->state->normal_termios;
                else 
                        *tty->termios = info->state->callout_termios;
index 5d3a5374408b2d88639c70461c1661e191218886..8d11b469ae9b31d74515e1e6c500e49cedb43dcd 100644 (file)
@@ -1717,8 +1717,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
                rs_wait_until_sent(tty, info->timeout);
        }
        shutdown(info);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
@@ -1850,7 +1850,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & ASYNC_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -1997,7 +1997,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
        unsigned long           page;
 
        MOD_INC_USE_COUNT; 
-       line = MINOR(tty->device) - tty->driver.minor_start;
+       line = MINOR(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= NR_PORTS)) {
                MOD_DEC_USE_COUNT; 
                return -ENODEV;
@@ -2016,7 +2016,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
 
 #ifdef SERIAL_DEBUG_OPEN
        baget_printk("rs_open %s%d, count = %d\n", 
-                    tty->driver.name, info->line,
+                    tty->driver->name, info->line,
                     info->state->count);
 #endif
        info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
@@ -2071,7 +2071,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
 
        if ((info->state->count == 1) &&
            (info->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->state->normal_termios;
                else 
                        *tty->termios = info->state->callout_termios;
index e1d446c382ebf3c9755438d597360a2e6335306f..1ad9ad3399c8da28aa5e8311ca0d0b5c3466d5fb 100644 (file)
@@ -48,8 +48,8 @@ static struct tty_struct *get_tty(int fd)
 
 static struct tty_struct *get_real_tty(struct tty_struct *tp)
 {
-       if (tp->driver.type == TTY_DRIVER_TYPE_PTY &&
-          tp->driver.subtype == PTY_TYPE_MASTER)
+       if (tp->driver->type == TTY_DRIVER_TYPE_PTY &&
+          tp->driver->subtype == PTY_TYPE_MASTER)
                return tp->link;
        else
                return tp;
index 2a3b4f0f485b4f15a75bc359528d697b4ab5428d..62054b4efaa87a5c5f588d966e505572a50555a6 100644 (file)
@@ -1446,7 +1446,7 @@ static int vt_check(struct file *file)
        if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl"))
                return -EINVAL;
                                                        
-       if (tty->driver.ioctl != vt_ioctl)
+       if (tty->driver->ioctl != vt_ioctl)
                return -EINVAL;
        
        /*
index e09a211576a1abe121ae6d9fea808617970bf3d0..a01fef2c69d70fe323a2ea295b8cbe92095c7138 100644 (file)
@@ -1053,7 +1053,7 @@ static void siccuart_flush_buffer(struct tty_struct *tty)
 
 #if DEBUG
     printk("siccuart_flush_buffer(%d) called\n",
-           MINOR(tty->device) - tty->driver.minor_start);
+           MINOR(tty->device) - tty->driver->minor_start);
 #endif
     save_flags(flags); cli();
     info->xmit.head = info->xmit.tail = 0;
@@ -1482,7 +1482,7 @@ static void siccuart_close(struct tty_struct *tty, struct file *filp)
         state->count = 1;
     }
     if (--state->count < 0) {
-        printk("rs_close: bad serial port count for %s%d: %d\n", tty->driver.name, info->state->line, state->count);
+        printk("rs_close: bad serial port count for %s%d: %d\n", tty->driver->name, info->state->line, state->count);
         state->count = 0;
     }
     if (state->count) {
@@ -1521,8 +1521,8 @@ static void siccuart_close(struct tty_struct *tty, struct file *filp)
         siccuart_wait_until_sent(tty, info->timeout);
     }
     siccuart_shutdown(info);
-    if (tty->driver.flush_buffer)
-        tty->driver.flush_buffer(tty);
+    if (tty->driver->flush_buffer)
+        tty->driver->flush_buffer(tty);
     if (tty->ldisc.flush_buffer)
         tty->ldisc.flush_buffer(tty);
     tty->closing = 0;
@@ -1580,7 +1580,7 @@ static void siccuart_wait_until_sent(struct tty_struct *tty, int timeout)
     expire = jiffies + timeout;
 #if DEBUG
     printk("siccuart_wait_until_sent(%d), jiff=%lu, expire=%lu  char_time=%lu...\n",
-           MINOR(tty->device) - tty->driver.minor_start, jiffies,
+           MINOR(tty->device) - tty->driver->minor_start, jiffies,
            expire, char_time);
 #endif
     while ((readb(info->port->uart_base + BL_SICC_LSR) & _LSR_TX_ALL) != _LSR_TX_ALL) {
@@ -1634,7 +1634,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
      * If this is a callout device, then just make sure the normal
      * device isn't being used.
      */
-    if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+    if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
         if (info->flags & ASYNC_NORMAL_ACTIVE)
             return -EBUSY;
         if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -1754,7 +1754,7 @@ static struct SICC_info *siccuart_get(int line)
 static int siccuart_open(struct tty_struct *tty, struct file *filp)
 {
     struct SICC_info *info;
-    int retval, line = MINOR(tty->device) - tty->driver.minor_start;
+    int retval, line = MINOR(tty->device) - tty->driver->minor_start;
 
 
     // is this a line that we've got?
@@ -1814,7 +1814,7 @@ static int siccuart_open(struct tty_struct *tty, struct file *filp)
 
     if ((info->state->count == 1) &&
         (info->flags & ASYNC_SPLIT_TERMIOS)) {
-        if (tty->driver.subtype == SERIAL_TYPE_NORMAL) {
+        if (tty->driver->subtype == SERIAL_TYPE_NORMAL) {
             *tty->termios = info->state->normal_termios;
         }
         else  {
index a79f85304f196bdf550784bb7c5a72f225c4a9f5..133ed20eb356cfbc3f9418b44e79393f44e56f32 100644 (file)
@@ -1701,8 +1701,8 @@ static void rs_8xx_close(struct tty_struct *tty, struct file * filp)
                rs_8xx_wait_until_sent(tty, info->timeout);
        }
        shutdown(info);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
@@ -1840,7 +1840,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & ASYNC_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -1975,7 +1975,7 @@ static int rs_8xx_open(struct tty_struct *tty, struct file * filp)
        ser_info_t      *info;
        int             retval, line;
 
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= NR_PORTS))
                return -ENODEV;
        retval = get_async_struct(line, &info);
@@ -1985,7 +1985,7 @@ static int rs_8xx_open(struct tty_struct *tty, struct file * filp)
                return -ENODEV;
 
 #ifdef SERIAL_DEBUG_OPEN
-       printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
+       printk("rs_open %s%d, count = %d\n", tty->driver->name, info->line,
               info->state->count);
 #endif
        tty->driver_data = info;
@@ -2010,7 +2010,7 @@ static int rs_8xx_open(struct tty_struct *tty, struct file * filp)
 
        if ((info->state->count == 1) &&
            (info->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->state->normal_termios;
                else 
                        *tty->termios = info->state->callout_termios;
index 17950803fd9fd87d5c9fe7f26b1fa220e7a9b1f0..785dd8e3e58f665644d2e2ae2df0b6600de276f3 100644 (file)
@@ -1750,8 +1750,8 @@ static void rs_8xx_close(struct tty_struct *tty, struct file * filp)
                rs_8xx_wait_until_sent(tty, info->timeout);
        }
        shutdown(info);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
@@ -1900,7 +1900,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & ASYNC_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -2035,7 +2035,7 @@ static int rs_8xx_open(struct tty_struct *tty, struct file * filp)
        ser_info_t      *info;
        int             retval, line;
 
-       line = MINOR(tty->device) - tty->driver.minor_start;
+       line = MINOR(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= NR_PORTS))
                return -ENODEV;
        retval = get_async_struct(line, &info);
@@ -2045,7 +2045,7 @@ static int rs_8xx_open(struct tty_struct *tty, struct file * filp)
                return -ENODEV;
 
 #ifdef SERIAL_DEBUG_OPEN
-       printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
+       printk("rs_open %s%d, count = %d\n", tty->driver->name, info->line,
               info->state->count);
 #endif
        tty->driver_data = info;
@@ -2071,7 +2071,7 @@ static int rs_8xx_open(struct tty_struct *tty, struct file * filp)
 
        if ((info->state->count == 1) &&
            (info->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->state->normal_termios;
                else 
                        *tty->termios = info->state->callout_termios;
index 788effdc19a61f6bcbe4d6050791a37f1333b1eb..beb42d7226968eb5f2347e1e10cdfbf040b12766 100644 (file)
@@ -1799,7 +1799,7 @@ static int vt_check(struct file *file)
        if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl"))
                return -EINVAL;
                                                        
-       if (tty->driver.ioctl != vt_ioctl)
+       if (tty->driver->ioctl != vt_ioctl)
                return -EINVAL;
        
        /*
index c56c269b69d46ffc35bc8aebd61256f1f26adc9f..97ded6599201b82b9751a5e2ffbbcba4a16353d8 100644 (file)
@@ -2109,7 +2109,7 @@ static int vt_check(struct file *file)
        if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl"))
                return -EINVAL;
                                                        
-       if (tty->driver.ioctl != vt_ioctl)
+       if (tty->driver->ioctl != vt_ioctl)
                return -EINVAL;
        
        /*
index 77acc8cb9588c47810d0a2f6b91aa5d5fd755745..5d1f9761e591c695945b5f04442cb319b76b2418 100644 (file)
@@ -109,7 +109,7 @@ int line_write(struct line *lines, struct tty_struct *tty, int from_user,
                buf = new;
        }
 
-       i = minor(tty->device) - tty->driver.minor_start;
+       i = minor(tty->device) - tty->driver->minor_start;
        line = &lines[i];
 
        down(&line->sem);
@@ -219,7 +219,7 @@ int line_open(struct line *lines, struct tty_struct *tty,
        int n, err = 0;
 
        if(tty == NULL) n = 0;
-       else n = minor(tty->device) - tty->driver.minor_start;
+       else n = minor(tty->device) - tty->driver->minor_start;
        line = &lines[n];
 
        down(&line->sem);
@@ -267,7 +267,7 @@ void line_close(struct line *lines, struct tty_struct *tty)
        int n;
 
        if(tty == NULL) n = 0;
-       else n = minor(tty->device) - tty->driver.minor_start;
+       else n = minor(tty->device) - tty->driver->minor_start;
        line = &lines[n];
 
        down(&line->sem);
index d4369c4f3a22fdf10bad6742faa8b060c5a68693..3e786a7794595b77033051c1ef502342d6072127 100644 (file)
@@ -1987,7 +1987,7 @@ static int vt_check(struct file *file)
        if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl"))
                return -EINVAL;
                                                        
-       if (tty->driver.ioctl != vt_ioctl)
+       if (tty->driver->ioctl != vt_ioctl)
                return -EINVAL;
        
        /*
index bff2dd64af10fb99554e956a8354b4ff833754dc..54996f2b7573c2320a17fe4c1f4e927bf7e38698 100644 (file)
@@ -145,7 +145,7 @@ restart:
                int len;
        
                set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
-               len = tty->driver.write(tty, 0, skb->data, skb->len);
+               len = tty->driver->write(tty, 0, skb->data, skb->len);
                hdev->stat.byte_tx += len;
 
                skb_pull(skb, len);
@@ -193,8 +193,8 @@ static int hci_uart_flush(struct hci_dev *hdev)
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
 
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
 
        if (test_bit(HCI_UART_PROTO_SET, &hu->flags))
                hu->proto->flush(hu);
@@ -286,8 +286,8 @@ static int hci_uart_tty_open(struct tty_struct *tty)
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
 
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
 
        return 0;
 }
@@ -384,8 +384,8 @@ static void hci_uart_tty_receive(struct tty_struct *tty, const __u8 *data, char
        hu->hdev.stat.byte_rx += count;
        spin_unlock(&hu->rx_lock);
 
-       if (test_and_clear_bit(TTY_THROTTLED,&tty->flags) && tty->driver.unthrottle)
-               tty->driver.unthrottle(tty);
+       if (test_and_clear_bit(TTY_THROTTLED,&tty->flags) && tty->driver->unthrottle)
+               tty->driver->unthrottle(tty);
 }
 
 static int hci_uart_register_dev(struct hci_uart *hu)
index 187b8434fb693d799913f706546a206414652070..b3e154117184f263bbf5a92efb4478f2f9c1ce20 100644 (file)
@@ -1598,8 +1598,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
                rs_wait_until_sent(tty, info->timeout);
        }
        shutdown(info);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
@@ -1741,7 +1741,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & ASYNC_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -1895,7 +1895,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
        unsigned long           page;
 
        MOD_INC_USE_COUNT;
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= NR_PORTS)) {
                MOD_DEC_USE_COUNT;
                return -ENODEV;
@@ -1911,7 +1911,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
                return -ENODEV;
 
 #ifdef SERIAL_DEBUG_OPEN
-       printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
+       printk("rs_open %s%d, count = %d\n", tty->driver->name, info->line,
               info->state->count);
 #endif
        info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
@@ -1961,7 +1961,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
 
        if ((info->state->count == 1) &&
            (info->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->state->normal_termios;
                else 
                        *tty->termios = info->state->callout_termios;
index fcd7cd1bda7c1c891ba5d3e9222d29783be84fb0..ac41f703148a65cfb0a60b01b93d4a15a31d91e2 100644 (file)
@@ -2378,7 +2378,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
      * If this is a callout device, then just make sure the normal
      * device isn't being used.
      */
-    if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+    if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
         if (info->flags & ASYNC_NORMAL_ACTIVE){
             return -EBUSY;
         }
@@ -2579,7 +2579,7 @@ cy_open(struct tty_struct *tty, struct file * filp)
   unsigned long page;
 
     MOD_INC_USE_COUNT;
-    line = minor(tty->device) - tty->driver.minor_start;
+    line = minor(tty->device) - tty->driver->minor_start;
     if ((line < 0) || (NR_PORTS <= line)){
        MOD_DEC_USE_COUNT;
         return -ENODEV;
@@ -2683,7 +2683,7 @@ cy_open(struct tty_struct *tty, struct file * filp)
     }
 
     if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) {
-        if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+        if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
             *tty->termios = info->normal_termios;
         else 
             *tty->termios = info->callout_termios;
@@ -2904,8 +2904,8 @@ cy_close(struct tty_struct *tty, struct file *filp)
 
     CY_UNLOCK(info, flags);
     shutdown(info);
-    if (tty->driver.flush_buffer)
-        tty->driver.flush_buffer(tty);
+    if (tty->driver->flush_buffer)
+        tty->driver->flush_buffer(tty);
     if (tty->ldisc.flush_buffer)
         tty->ldisc.flush_buffer(tty);
     CY_LOCK(info, flags);
index db281901522d607d794c977f46ce353c1b10e5ad..a3bf3db620a93f7d3ea49969b704008245b0285e 100644 (file)
@@ -1112,8 +1112,8 @@ static void dz_close(struct tty_struct *tty, struct file *filp)
         */
        shutdown(info);
 
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer (tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer (tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer (tty);
        tty->closing = 0;
@@ -1183,7 +1183,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & DZ_NORMAL_ACTIVE)
                        return -EBUSY;
     
@@ -1271,7 +1271,7 @@ static int dz_open (struct tty_struct *tty, struct file *filp)
        struct dz_serial *info;
        int retval, line;
 
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
 
        /*
         * The dz lines for the mouse/keyboard must be opened using their
@@ -1301,7 +1301,7 @@ static int dz_open (struct tty_struct *tty, struct file *filp)
                return retval;
 
        if ((info->count == 1) && (info->flags & DZ_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->normal_termios;
                else 
                        *tty->termios = info->callout_termios;
index de7ed6c42539609bea80f1d3128dcfd1b9c75a44..1992ab437f0aac0174a43796dbcc498f47fa5931 100644 (file)
@@ -503,7 +503,7 @@ static void pc_close(struct tty_struct * tty, struct file * filp)
        struct channel *ch;
        unsigned long flags;
 
-       if (tty->driver.subtype == SERIAL_TYPE_INFO) 
+       if (tty->driver->subtype == SERIAL_TYPE_INFO) 
        {
                return;
        }
@@ -574,8 +574,8 @@ static void pc_close(struct tty_struct * tty, struct file * filp)
                        tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */
                }
        
-               if (tty->driver.flush_buffer)
-                       tty->driver.flush_buffer(tty);
+               if (tty->driver->flush_buffer)
+                       tty->driver->flush_buffer(tty);
 
                if (tty->ldisc.flush_buffer)
                        tty->ldisc.flush_buffer(tty);
@@ -681,8 +681,8 @@ static void pc_hangup(struct tty_struct *tty)
 
                save_flags(flags);
                cli();
-               if (tty->driver.flush_buffer)
-                       tty->driver.flush_buffer(tty);
+               if (tty->driver->flush_buffer)
+                       tty->driver->flush_buffer(tty);
 
                if (tty->ldisc.flush_buffer)
                        tty->ldisc.flush_buffer(tty);
@@ -729,7 +729,7 @@ static int pc_write(struct tty_struct * tty, int from_user,
 
        /* Stop users from hurting themselves on control minor */
 
-       if (tty->driver.subtype == SERIAL_TYPE_INFO) 
+       if (tty->driver->subtype == SERIAL_TYPE_INFO) 
        {
                return (0) ;
        }
@@ -1238,7 +1238,7 @@ static int block_til_ready(struct tty_struct *tty,
           device isn't being used.
        -------------------------------------------------------------------- */
 
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) 
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) 
        { /* A cud device has been opened */
                if (ch->asyncflags & ASYNC_NORMAL_ACTIVE)
                        return -EBUSY;
@@ -1368,12 +1368,12 @@ static int pc_open(struct tty_struct *tty, struct file * filp)
 
        /* Nothing "real" happens in open of control device */
 
-       if (tty->driver.subtype == SERIAL_TYPE_INFO) 
+       if (tty->driver->subtype == SERIAL_TYPE_INFO) 
        {
                return (0) ;
        }
 
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if (line < 0 || line >= nbdevs) 
        {
                printk(KERN_ERR "<Error> - pc_open : line out of range in pc_open\n");
@@ -1453,7 +1453,7 @@ static int pc_open(struct tty_struct *tty, struct file * filp)
        /* Should this be here except for SPLIT termios ? */
        if (ch->count == 1) 
        {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = ch->normal_termios;
                else 
                        *tty->termios = ch->callout_termios;
@@ -2712,7 +2712,7 @@ static void epcaparam(struct tty_struct *tty, struct channel *ch)
                        the driver will wait on carrier detect.
                ------------------------------------------------------------------- */
 
-               if ((ts->c_cflag & CLOCAL) || (tty->driver.subtype == SERIAL_TYPE_CALLOUT))
+               if ((ts->c_cflag & CLOCAL) || (tty->driver->subtype == SERIAL_TYPE_CALLOUT))
                { /* Begin it is a cud device or a ttyD device with CLOCAL on */
                        ch->asyncflags &= ~ASYNC_CHECK_CD;
                } /* End it is a cud device or a ttyD device with CLOCAL on */
@@ -2960,7 +2960,7 @@ static int pc_ioctl(struct tty_struct *tty, struct file * file,
        struct channel *ch = (struct channel *) tty->driver_data;
        
        /* The control device has it's own set of commands */
-       if (tty->driver.subtype == SERIAL_TYPE_INFO) 
+       if (tty->driver->subtype == SERIAL_TYPE_INFO) 
        { /* Begin if subtype is the control device */
 
                switch (cmd) 
index 3f5021d4b86fccbf841f47f82ac836379782f832..59391d5dcbe9bdcac6d09f5aceea3b24afbfba5c 100644 (file)
@@ -2112,8 +2112,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
                rs_wait_until_sent(tty, info->timeout);
        }
        shutdown(info);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
@@ -2226,7 +2226,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & ASYNC_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -2354,7 +2354,7 @@ static int esp_open(struct tty_struct *tty, struct file * filp)
        struct esp_struct       *info;
        int                     retval, line;
 
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= NR_PORTS))
                return -ENODEV;
 
@@ -2371,7 +2371,7 @@ static int esp_open(struct tty_struct *tty, struct file * filp)
        }
 
 #ifdef SERIAL_DEBUG_OPEN
-       printk("esp_open %s%d, count = %d\n", tty->driver.name, info->line,
+       printk("esp_open %s%d, count = %d\n", tty->driver->name, info->line,
               info->count);
 #endif
        MOD_INC_USE_COUNT;
@@ -2402,7 +2402,7 @@ static int esp_open(struct tty_struct *tty, struct file * filp)
        }
 
        if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->normal_termios;
                else 
                        *tty->termios = info->callout_termios;
index a29bf19fdf384698f8381a16a705db1e9bf84a1c..67ae488451d291f980301596b142dc2d7e98eb14 100644 (file)
@@ -622,7 +622,7 @@ int gs_block_til_ready(void *port_, struct file * filp)
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == GS_TYPE_CALLOUT) {
+       if (tty->driver->subtype == GS_TYPE_CALLOUT) {
                if (port->flags & ASYNC_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((port->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -794,8 +794,8 @@ void gs_close(struct tty_struct * tty, struct file * filp)
 
        port->flags &= ~GS_ACTIVE;
 
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
index 1bf93044b78b8d40bd4073b18313ae4f5200458d..72f71fd6109c2ff7298e106c96459897c64b6e5f 100644 (file)
@@ -69,7 +69,7 @@ struct hvc_struct hvc_struct[MAX_NR_HVC_CONSOLES];
 
 static int hvc_open(struct tty_struct *tty, struct file * filp)
 {
-       int line = minor(tty->device) - tty->driver.minor_start;
+       int line = minor(tty->device) - tty->driver->minor_start;
        struct hvc_struct *hp;
        unsigned long flags;
 
index 45aed6f25cf46b782447b8f379af1559a7de29e5..f071fdb3411a085fee0f8e2c56873b26a31931cf 100644 (file)
@@ -1616,7 +1616,7 @@ ip2_open( PTTY tty, struct file *pFile )
         *    (These are the only tests the standard serial driver makes for
         *    callout devices.)
         */
-       if ( tty->driver.subtype == SERIAL_TYPE_CALLOUT ) {
+       if ( tty->driver->subtype == SERIAL_TYPE_CALLOUT ) {
                if ( pCh->flags & ASYNC_NORMAL_ACTIVE ) {
                        return -EBUSY;
                }
@@ -1719,7 +1719,7 @@ noblock:
        if ( tty->count == 1 ) {
                i2QueueCommands(PTYPE_INLINE, pCh, 0, 2, CMD_CTSFL_DSAB, CMD_RTSFL_DSAB);
                if ( pCh->flags & ASYNC_SPLIT_TERMIOS ) {
-                       if ( tty->driver.subtype == SERIAL_TYPE_NORMAL ) {
+                       if ( tty->driver->subtype == SERIAL_TYPE_NORMAL ) {
                                *tty->termios = pCh->NormalTermios;
                        } else {
                                *tty->termios = pCh->CalloutTermios;
@@ -1827,8 +1827,8 @@ ip2_close( PTTY tty, struct file *pFile )
 
        serviceOutgoingFifo ( pCh->pMyBord );
 
-       if ( tty->driver.flush_buffer ) 
-               tty->driver.flush_buffer(tty);
+       if ( tty->driver->flush_buffer ) 
+               tty->driver->flush_buffer(tty);
        if ( tty->ldisc.flush_buffer )  
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
index 11851a8ad1e43b77c7f99973ce54547e22a1d21f..3140e956ee37d3495a9567085e9db5bc1a325fb7 100644 (file)
@@ -907,7 +907,7 @@ static int block_til_ready(struct tty_struct * tty, struct file * filp, struct i
        
        /* trying to open a callout device... check for constraints */
        
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
 #ifdef ISICOM_DEBUG
                printk(KERN_DEBUG "ISICOM: bl_ti_rdy: callout open.\n");        
 #endif         
@@ -1021,7 +1021,7 @@ static int isicom_open(struct tty_struct * tty, struct file * filp)
 #ifdef ISICOM_DEBUG    
        printk(KERN_DEBUG "ISICOM: open start!!!.\n");
 #endif 
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        
 #ifdef ISICOM_DEBUG    
        printk(KERN_DEBUG "line = %d.\n", line);
@@ -1072,7 +1072,7 @@ static int isicom_open(struct tty_struct * tty, struct file * filp)
                return error;
                
        if ((port->count == 1) && (port->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = port->normal_termios;
                else 
                        *tty->termios = port->callout_termios;
@@ -1196,8 +1196,8 @@ static void isicom_close(struct tty_struct * tty, struct file * filp)
                outw(card->port_status, card->base + 0x02);
        }       
        isicom_shutdown_port(port);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
index f093d3f9838713a5d42c8113f1e7cfc4935683d0..5211ec885d842cc9df83765fc60e2609bddc03b3 100644 (file)
@@ -1115,7 +1115,7 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
  *     previous opens still in effect. If we are a normal serial device
  *     then also we might have to wait for carrier.
  */
-       if (tty->driver.subtype == STL_DRVTYPCALLOUT) {
+       if (tty->driver->subtype == STL_DRVTYPCALLOUT) {
                if (portp->flags & ASYNC_NORMAL_ACTIVE)
                        return(-EBUSY);
                if (portp->flags & ASYNC_CALLOUT_ACTIVE) {
@@ -1139,7 +1139,7 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
        }
 
        if ((portp->refcount == 1) && (portp->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == STL_DRVTYPSERIAL)
+               if (tty->driver->subtype == STL_DRVTYPSERIAL)
                        *tty->termios = portp->normaltermios;
                else
                        *tty->termios = portp->callouttermios;
index ef1fd1b6b0df52664689d8ce71dc9d78386f5a8a..dd9b1dd4e828b0ead28bfd74da203af274a7785d 100644 (file)
@@ -1089,7 +1089,7 @@ void kbd_keycode(unsigned int keycode, int down, struct pt_regs *regs)
                clear_bit(keycode, key_down);
 
        if (rep && (!vc_kbd_mode(kbd, VC_REPEAT) || (tty && 
-               (!L_ECHO(tty) && tty->driver.chars_in_buffer(tty))))) {
+               (!L_ECHO(tty) && tty->driver->chars_in_buffer(tty))))) {
                /*
                 * Don't repeat a key if the input buffers are not empty and the
                 * characters get aren't echoed locally. This makes key repeat 
index dc5f93e403956b4e00bacf13ccdeef77e70f2fa4..f3f7a71e050630be6cec9e6a913585314f90b2de 100644 (file)
@@ -189,7 +189,7 @@ static struct mxser_mstatus GMStatus[MAX_PORTS];
 
 #define WAKEUP_CHARS           256
 
-#define PORTNO(x)              (minor((x)->device) - (x)->driver.minor_start)
+#define PORTNO(x)              (minor((x)->device) - (x)->driver->minor_start)
 
 static int verbose = 0;
 static int ttymajor = MOXAMAJOR;
@@ -585,7 +585,7 @@ static int moxa_open(struct tty_struct *tty, struct file *filp)
        tty->driver_data = ch;
        ch->tty = tty;
        if (ch->count == 1 && (ch->asyncflags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = ch->normal_termios;
                else
                        *tty->termios = ch->callout_termios;
@@ -671,8 +671,8 @@ static void moxa_close(struct tty_struct *tty, struct file *filp)
        shut_down(ch);
        MoxaPortFlushData(port, 2);
 
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
@@ -1094,7 +1094,7 @@ static int block_till_ready(struct tty_struct *tty, struct file *filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (ch->asyncflags & ASYNC_NORMAL_ACTIVE)
                        return (-EBUSY);
                if ((ch->asyncflags & ASYNC_CALLOUT_ACTIVE) &&
index f5bb6a2d49994562388000e94db2f4d7d55d4ff9..56f397efc8a62e6f06defa580b471e17edc6ae12 100644 (file)
@@ -94,7 +94,7 @@
 #define        UART_MCR_AFE            0x20
 #define        UART_LSR_SPECIAL        0x1E
 
-#define PORTNO(x)              (minor((x)->device) - (x)->driver.minor_start)
+#define PORTNO(x)              (minor((x)->device) - (x)->driver->minor_start)
 
 #define RELEVANT_IFLAG(iflag)  (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
 
@@ -758,7 +758,7 @@ static int mxser_open(struct tty_struct *tty, struct file *filp)
                return (retval);
 
        if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->normal_termios;
                else
                        *tty->termios = info->callout_termios;
@@ -862,8 +862,8 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
                }
        }
        mxser_shutdown(info);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
@@ -1574,7 +1574,7 @@ static int mxser_block_til_ready(struct tty_struct *tty, struct file *filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & ASYNC_NORMAL_ACTIVE)
                        return (-EBUSY);
                if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
index 4bebe76f0f8b1af84fc90ad62a19943ce19dd7e1..6e8198c4988ba737966f8f5cd67a9e0299e20bf8 100644 (file)
@@ -348,8 +348,8 @@ static int n_hdlc_tty_open (struct tty_struct *tty)
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer (tty);
 
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer (tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer (tty);
                
        if (debuglevel >= DEBUG_LEVEL_INFO)     
                printk("%s(%d)n_hdlc_tty_open() success\n",__FILE__,__LINE__);
@@ -403,7 +403,7 @@ static void n_hdlc_send_frames (struct n_hdlc *n_hdlc, struct tty_struct *tty)
                        
                /* Send the next block of data to device */
                tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
-               actual = tty->driver.write(tty, 0, tbuf->buf, tbuf->count);
+               actual = tty->driver->write(tty, 0, tbuf->buf, tbuf->count);
                    
                /* if transmit error, throw frame away by */
                /* pretending it was accepted by driver */
@@ -780,8 +780,8 @@ static int n_hdlc_tty_ioctl (struct tty_struct *tty, struct file * file,
 
        case TIOCOUTQ:
                /* get the pending tx byte count in the driver */
-               count = tty->driver.chars_in_buffer ?
-                               tty->driver.chars_in_buffer(tty) : 0;
+               count = tty->driver->chars_in_buffer ?
+                               tty->driver->chars_in_buffer(tty) : 0;
                /* add size of next output frame in queue */
                spin_lock_irqsave(&n_hdlc->tx_buf_list.spinlock,flags);
                if (n_hdlc->tx_buf_list.head)
index 06801b2dc8dfa7f50e0daca7a2f8376018425c41..36b6eab356d0ec8dc3d5b2ad564d91d043305024 100644 (file)
@@ -418,9 +418,9 @@ static void put_char(struct r3964_info *pInfo, unsigned char ch)
    if(tty==NULL)
       return;
 
-   if(tty->driver.put_char)
+   if(tty->driver->put_char)
    {
-      tty->driver.put_char(tty, ch);
+      tty->driver->put_char(tty, ch);
    }
    pInfo->bcc ^= ch;
 }
@@ -432,9 +432,9 @@ static void flush(struct r3964_info *pInfo)
    if(tty==NULL)
       return;
 
-   if(tty->driver.flush_chars)
+   if(tty->driver->flush_chars)
    {
-      tty->driver.flush_chars(tty);
+      tty->driver->flush_chars(tty);
    }
 }
 
@@ -507,8 +507,8 @@ static void transmit_block(struct r3964_info *pInfo)
       return;
    }
 
-   if(tty->driver.write_room)
-      room=tty->driver.write_room(tty);
+   if(tty->driver->write_room)
+      room=tty->driver->write_room(tty);
 
    TRACE_PS("transmit_block %x, room %d, length %d", 
           (int)pBlock, room, pBlock->length);
index d39dcbc95cebbb546b7049027db2711ea18c3da2..41b3cd51cf3a5627b443a3377ff27692dd0bce46 100644 (file)
@@ -117,8 +117,8 @@ static void check_unthrottle(struct tty_struct * tty)
 {
        if (tty->count &&
            test_and_clear_bit(TTY_THROTTLED, &tty->flags) && 
-           tty->driver.unthrottle)
-               tty->driver.unthrottle(tty);
+           tty->driver->unthrottle)
+               tty->driver->unthrottle(tty);
 }
 
 /*
@@ -183,7 +183,7 @@ static int opost(unsigned char c, struct tty_struct *tty)
 {
        int     space, spaces;
 
-       space = tty->driver.write_room(tty);
+       space = tty->driver->write_room(tty);
        if (!space)
                return -1;
 
@@ -195,7 +195,7 @@ static int opost(unsigned char c, struct tty_struct *tty)
                        if (O_ONLCR(tty)) {
                                if (space < 2)
                                        return -1;
-                               tty->driver.put_char(tty, '\r');
+                               tty->driver->put_char(tty, '\r');
                                tty->column = 0;
                        }
                        tty->canon_column = tty->column;
@@ -217,7 +217,7 @@ static int opost(unsigned char c, struct tty_struct *tty)
                                if (space < spaces)
                                        return -1;
                                tty->column += spaces;
-                               tty->driver.write(tty, 0, "        ", spaces);
+                               tty->driver->write(tty, 0, "        ", spaces);
                                return 0;
                        }
                        tty->column += spaces;
@@ -234,7 +234,7 @@ static int opost(unsigned char c, struct tty_struct *tty)
                        break;
                }
        }
-       tty->driver.put_char(tty, c);
+       tty->driver->put_char(tty, c);
        return 0;
 }
 
@@ -250,7 +250,7 @@ static ssize_t opost_block(struct tty_struct * tty,
        int     i;
        char    *cp;
 
-       space = tty->driver.write_room(tty);
+       space = tty->driver->write_room(tty);
        if (!space)
                return 0;
        if (nr > space)
@@ -296,9 +296,9 @@ static ssize_t opost_block(struct tty_struct * tty,
                }
        }
 break_out:
-       if (tty->driver.flush_chars)
-               tty->driver.flush_chars(tty);
-       i = tty->driver.write(tty, 0, buf, i);  
+       if (tty->driver->flush_chars)
+               tty->driver->flush_chars(tty);
+       i = tty->driver->write(tty, 0, buf, i); 
        return i;
 }
 
@@ -306,7 +306,7 @@ break_out:
 
 static inline void put_char(unsigned char c, struct tty_struct *tty)
 {
-       tty->driver.put_char(tty, c);
+       tty->driver->put_char(tty, c);
 }
 
 /* Must be called only when L_ECHO(tty) is true. */
@@ -452,8 +452,8 @@ static inline void isig(int sig, struct tty_struct *tty, int flush)
                kill_pg(tty->pgrp, sig, 1);
        if (flush || !L_NOFLSH(tty)) {
                n_tty_flush_buffer(tty);
-               if (tty->driver.flush_buffer)
-                       tty->driver.flush_buffer(tty);
+               if (tty->driver->flush_buffer)
+                       tty->driver->flush_buffer(tty);
        }
 }
 
@@ -782,8 +782,8 @@ static void n_tty_receive_buf(struct tty_struct *tty, const unsigned char *cp,
                                break;
                        }
                }
-               if (tty->driver.flush_chars)
-                       tty->driver.flush_chars(tty);
+               if (tty->driver->flush_chars)
+                       tty->driver->flush_chars(tty);
        }
 
        if (!tty->icanon && (tty->read_cnt >= tty->minimum_to_wake)) {
@@ -800,8 +800,8 @@ static void n_tty_receive_buf(struct tty_struct *tty, const unsigned char *cp,
        if (n_tty_receive_room(tty) < TTY_THRESHOLD_THROTTLE) {
                /* check TTY_THROTTLED first so it indicates our state */
                if (!test_and_set_bit(TTY_THROTTLED, &tty->flags) &&
-                   tty->driver.throttle)
-                       tty->driver.throttle(tty);
+                   tty->driver->throttle)
+                       tty->driver->throttle(tty);
        }
 }
 
@@ -869,7 +869,7 @@ static void n_tty_set_termios(struct tty_struct *tty, struct termios * old)
                tty->raw = 1;
                if ((I_IGNBRK(tty) || (!I_BRKINT(tty) && !I_PARMRK(tty))) &&
                    (I_IGNPAR(tty) || !I_INPCK(tty)) &&
-                   (tty->driver.flags & TTY_DRIVER_REAL_RAW))
+                   (tty->driver->flags & TTY_DRIVER_REAL_RAW))
                        tty->real_raw = 1;
                else
                        tty->real_raw = 0;
@@ -1205,10 +1205,10 @@ static ssize_t write_chan(struct tty_struct * tty, struct file * file,
                                        break;
                                b++; nr--;
                        }
-                       if (tty->driver.flush_chars)
-                               tty->driver.flush_chars(tty);
+                       if (tty->driver->flush_chars)
+                               tty->driver->flush_chars(tty);
                } else {
-                       c = tty->driver.write(tty, 1, b, nr);
+                       c = tty->driver->write(tty, 1, b, nr);
                        if (c < 0) {
                                retval = c;
                                goto break_out;
@@ -1251,7 +1251,7 @@ static unsigned int normal_poll(struct tty_struct * tty, struct file * file, pol
                else
                        tty->minimum_to_wake = 1;
        }
-       if (tty->driver.chars_in_buffer(tty) < WAKEUP_CHARS)
+       if (tty->driver->chars_in_buffer(tty) < WAKEUP_CHARS)
                mask |= POLLOUT | POLLWRNORM;
        return mask;
 }
index ee522fa8d2cd263d62e0f01b84bae1e56146c032..c2d58fd49aa6e0593b95364c6de5cbe9575add2a 100644 (file)
@@ -2516,7 +2516,7 @@ static void mgslpc_set_termios(struct tty_struct *tty, struct termios *old_termi
        
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):mgslpc_set_termios %s\n", __FILE__,__LINE__,
-                       tty->driver.name );
+                       tty->driver->name );
        
        /* just return if nothing has changed */
        if ((tty->termios->c_cflag == old_termios->c_cflag)
@@ -2615,8 +2615,8 @@ static void mgslpc_close(struct tty_struct *tty, struct file * filp)
        if (info->flags & ASYNC_INITIALIZED)
                mgslpc_wait_until_sent(tty, info->timeout);
 
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
                
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
@@ -2642,7 +2642,7 @@ static void mgslpc_close(struct tty_struct *tty, struct file * filp)
 cleanup:                       
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):mgslpc_close(%s) exit, count=%d\n", __FILE__,__LINE__,
-                       tty->driver.name, info->count);
+                       tty->driver->name, info->count);
 }
 
 /* Wait until the transmitter is empty.
@@ -2747,9 +2747,9 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
        
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):block_til_ready on %s\n",
-                        __FILE__,__LINE__, tty->driver.name );
+                        __FILE__,__LINE__, tty->driver->name );
 
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                /* this is a callout device */
                /* just verify that normal device is not in use */
                if (info->flags & ASYNC_NORMAL_ACTIVE)
@@ -2795,7 +2795,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
        
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):block_til_ready before block on %s count=%d\n",
-                        __FILE__,__LINE__, tty->driver.name, info->count );
+                        __FILE__,__LINE__, tty->driver->name, info->count );
 
        spin_lock_irqsave(&info->lock, flags);
        if (!tty_hung_up_p(filp)) {
@@ -2839,7 +2839,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
                
                if (debug_level >= DEBUG_LEVEL_INFO)
                        printk("%s(%d):block_til_ready blocking on %s count=%d\n",
-                                __FILE__,__LINE__, tty->driver.name, info->count );
+                                __FILE__,__LINE__, tty->driver->name, info->count );
                                 
                schedule();
        }
@@ -2853,7 +2853,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
        
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):block_til_ready after blocking on %s count=%d\n",
-                        __FILE__,__LINE__, tty->driver.name, info->count );
+                        __FILE__,__LINE__, tty->driver->name, info->count );
                         
        if (!retval)
                info->flags |= ASYNC_NORMAL_ACTIVE;
@@ -2868,7 +2868,7 @@ static int mgslpc_open(struct tty_struct *tty, struct file * filp)
        unsigned long flags;
 
        /* verify range of specified line number */     
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= mgslpc_device_count)) {
                printk("%s(%d):mgslpc_open with illegal line #%d.\n",
                        __FILE__,__LINE__,line);
@@ -2892,7 +2892,7 @@ static int mgslpc_open(struct tty_struct *tty, struct file * filp)
                
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):mgslpc_open(%s), old ref count = %d\n",
-                        __FILE__,__LINE__,tty->driver.name, info->count);
+                        __FILE__,__LINE__,tty->driver->name, info->count);
 
        /* If port is closing, signal caller to try again */
        if (tty_hung_up_p(filp) || info->flags & ASYNC_CLOSING){
@@ -2931,7 +2931,7 @@ static int mgslpc_open(struct tty_struct *tty, struct file * filp)
 
        if ((info->count == 1) &&
            info->flags & ASYNC_SPLIT_TERMIOS) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->normal_termios;
                else 
                        *tty->termios = info->callout_termios;
index a510ba66d6efeb9955dfec0f2b0d44d33ee3bb40..200660e3101a90b9b2518ab5cdd3885deb86e218 100644 (file)
@@ -405,7 +405,7 @@ int pcxe_open(struct tty_struct *tty, struct file * filp)
        int boardnum;
        int retval;
 
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
 
        if(line < 0 || line >= nbdevs) {
                printk("line out of range in pcxe_open\n");
@@ -482,7 +482,7 @@ int pcxe_open(struct tty_struct *tty, struct file * filp)
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (ch->asyncflags & ASYNC_NORMAL_ACTIVE)
                        return -EBUSY;
                if (ch->asyncflags & ASYNC_CALLOUT_ACTIVE) {
@@ -517,7 +517,7 @@ int pcxe_open(struct tty_struct *tty, struct file * filp)
        save_flags(flags);
        cli();
        if((ch->count == 1) && (ch->asyncflags & ASYNC_SPLIT_TERMIOS)) {
-               if(tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if(tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = ch->normal_termios;
                else 
                        *tty->termios = ch->callout_termios;
@@ -617,8 +617,8 @@ static void pcxe_close(struct tty_struct * tty, struct file * filp)
                        tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */
                }
        
-               if(tty->driver.flush_buffer)
-                       tty->driver.flush_buffer(tty);
+               if(tty->driver->flush_buffer)
+                       tty->driver->flush_buffer(tty);
                if(tty->ldisc.flush_buffer)
                        tty->ldisc.flush_buffer(tty);
                shutdown(info);
index c7a5300d47478026407e7885af32c943410835d9..45e62e6cf165af55c0b7c837cb384c2593102723 100644 (file)
@@ -68,7 +68,7 @@ static void pty_close(struct tty_struct * tty, struct file * filp)
 {
        if (!tty)
                return;
-       if (tty->driver.subtype == PTY_TYPE_MASTER) {
+       if (tty->driver->subtype == PTY_TYPE_MASTER) {
                if (tty->count > 1)
                        printk("master pty_close: count = %d!!\n", tty->count);
        } else {
@@ -84,14 +84,14 @@ static void pty_close(struct tty_struct * tty, struct file * filp)
        wake_up_interruptible(&tty->link->read_wait);
        wake_up_interruptible(&tty->link->write_wait);
        set_bit(TTY_OTHER_CLOSED, &tty->link->flags);
-       if (tty->driver.subtype == PTY_TYPE_MASTER) {
+       if (tty->driver->subtype == PTY_TYPE_MASTER) {
                set_bit(TTY_OTHER_CLOSED, &tty->flags);
 #ifdef CONFIG_UNIX98_PTYS
                {
                        unsigned int major = major(tty->device) - UNIX98_PTY_MASTER_MAJOR;
                        if ( major < UNIX98_NR_MAJORS ) {
                                devpts_pty_kill( minor(tty->device)
-                         - tty->driver.minor_start + tty->driver.name_base );
+                         - tty->driver->minor_start + tty->driver->name_base );
                        }
                }
 #endif
@@ -220,7 +220,7 @@ static int pty_chars_in_buffer(struct tty_struct *tty)
        /* The ldisc must report 0 if no characters available to be read */
        count = to->ldisc.chars_in_buffer(to);
 
-       if (tty->driver.subtype == PTY_TYPE_SLAVE) return count;
+       if (tty->driver->subtype == PTY_TYPE_SLAVE) return count;
 
        /* Master side driver ... if the other side's read buffer is less than 
         * half full, return 0 to allow writers to proceed; otherwise return
@@ -239,7 +239,7 @@ static int pty_chars_in_buffer(struct tty_struct *tty)
 static int pty_get_device_number(struct tty_struct *tty, unsigned int *value)
 {
        unsigned int result = minor(tty->device)
-               - tty->driver.minor_start + tty->driver.name_base;
+               - tty->driver->minor_start + tty->driver->name_base;
        return put_user(result, value);
 }
 #endif
@@ -313,10 +313,10 @@ static int pty_open(struct tty_struct *tty, struct file * filp)
        retval = -ENODEV;
        if (!tty || !tty->link)
                goto out;
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= NR_PTYS))
                goto out;
-       pty = (struct pty_struct *)(tty->driver.driver_state) + line;
+       pty = (struct pty_struct *)(tty->driver->driver_state) + line;
        tty->driver_data = pty;
 
        retval = -EIO;
index 1522f1f82f9fdb94fffc7a52c5829f37f6172808..9444ca8dec4759606a4e1f7460c5a85f5de75ff1 100644 (file)
@@ -991,7 +991,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == RISCOM_TYPE_CALLOUT) {
+       if (tty->driver->subtype == RISCOM_TYPE_CALLOUT) {
                if (port->flags & ASYNC_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((port->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -1112,7 +1112,7 @@ static int rc_open(struct tty_struct * tty, struct file * filp)
                return error;
        
        if ((port->count == 1) && (port->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == RISCOM_TYPE_NORMAL)
+               if (tty->driver->subtype == RISCOM_TYPE_NORMAL)
                        *tty->termios = port->normal_termios;
                else
                        *tty->termios = port->callout_termios;
@@ -1198,8 +1198,8 @@ static void rc_close(struct tty_struct * tty, struct file * filp)
                }
        }
        rc_shutdown_port(bp, port);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
index 5c3b4b600761ecf1dca19ede0d6b2cfadb13d50e..b16c7e40b82fb50499f3c872992e959124eb3893 100644 (file)
@@ -710,7 +710,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & ROCKET_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((info->flags & ROCKET_CALLOUT_ACTIVE) &&
@@ -822,7 +822,7 @@ static int rp_open(struct tty_struct *tty, struct file * filp)
        CHANNEL_t       *cp;
        unsigned long page;
        
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= MAX_RP_PORTS))
                return -ENODEV;
        if (!tmp_buf) {
@@ -946,7 +946,7 @@ static int rp_open(struct tty_struct *tty, struct file * filp)
        }
 
        if ((info->count == 1) && (info->flags & ROCKET_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->normal_termios;
                else 
                        *tty->termios = info->callout_termios;
@@ -1048,8 +1048,8 @@ static void rp_close(struct tty_struct *tty, struct file * filp)
        if (C_HUPCL(tty)) {
                sClrDTR(cp);
        }
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
 
@@ -1329,9 +1329,9 @@ static int rp_ioctl(struct tty_struct *tty, struct file * file,
 static char *rp_tty_name(struct tty_struct *tty, char *buf)
 {
        if (tty)
-               sprintf(buf, "%s%d", tty->driver.name,
-                       minor(tty->device) - tty->driver.minor_start +
-                       tty->driver.name_base);
+               sprintf(buf, "%s%d", tty->driver->name,
+                       minor(tty->device) - tty->driver->minor_start +
+                       tty->driver->name_base);
        else
                strcpy(buf, "NULL tty");
        return buf;
index 889f13f6abb18833298bdb1c34080d9ffe4b1efa..a82a3b925594ee06232bf7dc2aef646a8445ec4f 100644 (file)
@@ -480,7 +480,7 @@ static int  a2232_open(struct tty_struct * tty, struct file * filp)
        }
 
        if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)){
-               if (tty->driver.subtype == A2232_TTY_SUBTYPE_NORMAL)
+               if (tty->driver->subtype == A2232_TTY_SUBTYPE_NORMAL)
                        *tty->termios = port->gs.normal_termios;
                else 
                        *tty->termios = port->gs.callout_termios;
index 1800ea9984dd3c94bcee105bf1efd78aed8d438f..9d8f411972fd25203a90840010056ee9371c660d 100644 (file)
@@ -1913,8 +1913,8 @@ cy_close(struct tty_struct * tty, struct file * filp)
     if (info->flags & ASYNC_INITIALIZED)
        tty_wait_until_sent(tty, 3000); /* 30 seconds timeout */
     shutdown(info);
-    if (tty->driver.flush_buffer)
-       tty->driver.flush_buffer(tty);
+    if (tty->driver->flush_buffer)
+       tty->driver->flush_buffer(tty);
     if (tty->ldisc.flush_buffer)
        tty->ldisc.flush_buffer(tty);
     info->event = 0;
@@ -2008,7 +2008,7 @@ block_til_ready(struct tty_struct *tty, struct file * filp,
      * If this is a callout device, then just make sure the normal
      * device isn't being used.
      */
-    if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+    if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
        if (info->flags & ASYNC_NORMAL_ACTIVE){
            return -EBUSY;
        }
@@ -2133,7 +2133,7 @@ cy_open(struct tty_struct *tty, struct file * filp)
   int retval, line;
 
 /* CP('O'); */
-    line = minor(tty->device) - tty->driver.minor_start;
+    line = minor(tty->device) - tty->driver->minor_start;
     if ((line < 0) || (NR_PORTS <= line)){
         return -ENODEV;
     }
@@ -2165,7 +2165,7 @@ cy_open(struct tty_struct *tty, struct file * filp)
     }
 
     if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) {
-       if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+       if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
            *tty->termios = info->normal_termios;
        else 
            *tty->termios = info->callout_termios;
index ded61de976d2fdfbb7ba7bd3d4020d80d1dd5972..d13725ed1ceb52c7dfb3f5a5ecab1e60323a1b2b 100644 (file)
@@ -547,7 +547,7 @@ static int rs_open  (struct tty_struct * tty, struct file * filp)
                return -EIO;
        }
 
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        rs_dprintk (TX3912_UART_DEBUG_OPEN, "%d: opening line %d. tty=%p ctty=%p)\n", 
                    (int) current->pid, line, tty, current->tty);
 
@@ -602,7 +602,7 @@ static int rs_open  (struct tty_struct * tty, struct file * filp)
        /* tty->low_latency = 1; */
 
        if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = port->gs.normal_termios;
                else 
                        *tty->termios = port->gs.callout_termios;
index 8126a71d0b0b3cc90c0313ea0b48cc39e67775ba..1cfe4c4cde95407691aee0a78dfae31c13e5dc3d 100644 (file)
@@ -853,7 +853,7 @@ static int sci_open(struct tty_struct * tty, struct file * filp)
        }
 
        if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = port->gs.normal_termios;
                else 
                        *tty->termios = port->gs.callout_termios;
index 98b3dbb07e74d66819033b8da38409af7cc86dba..cdb9f2993313baeaa6fe0406359546eddc9dd0b9 100644 (file)
@@ -1349,7 +1349,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SPECIALIX_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SPECIALIX_TYPE_CALLOUT) {
                if (port->flags & ASYNC_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((port->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -1484,7 +1484,7 @@ static int sx_open(struct tty_struct * tty, struct file * filp)
                return error;
 
        if ((port->count == 1) && (port->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SPECIALIX_TYPE_NORMAL)
+               if (tty->driver->subtype == SPECIALIX_TYPE_NORMAL)
                        *tty->termios = port->normal_termios;
                else
                        *tty->termios = port->callout_termios;
@@ -1576,8 +1576,8 @@ static void sx_close(struct tty_struct * tty, struct file * filp)
 
        }
        sx_shutdown_port(bp, port);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
index 141c03bf9844638d6814e6fb25ae4401f11ebe96..9a18f77e22a5dbd2e83276affcbffab6c3d15e84 100644 (file)
@@ -1090,7 +1090,7 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
  *     previous opens still in effect. If we are a normal serial device
  *     then also we might have to wait for carrier.
  */
-       if (tty->driver.subtype == STL_DRVTYPCALLOUT) {
+       if (tty->driver->subtype == STL_DRVTYPCALLOUT) {
                if (portp->flags & ASYNC_NORMAL_ACTIVE)
                        return(-EBUSY);
                if (portp->flags & ASYNC_CALLOUT_ACTIVE) {
@@ -1114,7 +1114,7 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
        }
 
        if ((portp->refcount == 1) && (portp->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == STL_DRVTYPSERIAL)
+               if (tty->driver->subtype == STL_DRVTYPSERIAL)
                        *tty->termios = portp->normaltermios;
                else
                        *tty->termios = portp->callouttermios;
index fca096a23b4d19f366493263a04ac71068f7e8f7..871a81b694cf79e1a548bd0ab00a7a12862821ec 100644 (file)
@@ -1500,7 +1500,7 @@ static int sx_open  (struct tty_struct * tty, struct file * filp)
        /* tty->low_latency = 1; */
 
        if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = port->gs.normal_termios;
                else 
                        *tty->termios = port->gs.callout_termios;
index 6e76e67aa9e46d92f45038db1e206cdd2b3e3daa..b73a13abbf813bd028ca125bfbb003e54d119bfa 100644 (file)
@@ -3125,7 +3125,7 @@ static void mgsl_set_termios(struct tty_struct *tty, struct termios *old_termios
        
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):mgsl_set_termios %s\n", __FILE__,__LINE__,
-                       tty->driver.name );
+                       tty->driver->name );
        
        /* just return if nothing has changed */
        if ((tty->termios->c_cflag == old_termios->c_cflag)
@@ -3237,8 +3237,8 @@ static void mgsl_close(struct tty_struct *tty, struct file * filp)
        if (info->flags & ASYNC_INITIALIZED)
                mgsl_wait_until_sent(tty, info->timeout);
 
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
                
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
@@ -3264,7 +3264,7 @@ static void mgsl_close(struct tty_struct *tty, struct file * filp)
 cleanup:                       
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):mgsl_close(%s) exit, count=%d\n", __FILE__,__LINE__,
-                       tty->driver.name, info->count);
+                       tty->driver->name, info->count);
                        
 }      /* end of mgsl_close() */
 
@@ -3397,9 +3397,9 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
        
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):block_til_ready on %s\n",
-                        __FILE__,__LINE__, tty->driver.name );
+                        __FILE__,__LINE__, tty->driver->name );
 
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                /* this is a callout device */
                /* just verify that normal device is not in use */
                if (info->flags & ASYNC_NORMAL_ACTIVE)
@@ -3445,7 +3445,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
        
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):block_til_ready before block on %s count=%d\n",
-                        __FILE__,__LINE__, tty->driver.name, info->count );
+                        __FILE__,__LINE__, tty->driver->name, info->count );
 
        spin_lock_irqsave(&info->irq_spinlock, flags);
        if (!tty_hung_up_p(filp)) {
@@ -3489,7 +3489,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
                
                if (debug_level >= DEBUG_LEVEL_INFO)
                        printk("%s(%d):block_til_ready blocking on %s count=%d\n",
-                                __FILE__,__LINE__, tty->driver.name, info->count );
+                                __FILE__,__LINE__, tty->driver->name, info->count );
                                 
                schedule();
        }
@@ -3503,7 +3503,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
        
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):block_til_ready after blocking on %s count=%d\n",
-                        __FILE__,__LINE__, tty->driver.name, info->count );
+                        __FILE__,__LINE__, tty->driver->name, info->count );
                         
        if (!retval)
                info->flags |= ASYNC_NORMAL_ACTIVE;
@@ -3530,7 +3530,7 @@ static int mgsl_open(struct tty_struct *tty, struct file * filp)
        unsigned long flags;
 
        /* verify range of specified line number */     
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= mgsl_device_count)) {
                printk("%s(%d):mgsl_open with illegal line #%d.\n",
                        __FILE__,__LINE__,line);
@@ -3554,7 +3554,7 @@ static int mgsl_open(struct tty_struct *tty, struct file * filp)
                
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):mgsl_open(%s), old ref count = %d\n",
-                        __FILE__,__LINE__,tty->driver.name, info->count);
+                        __FILE__,__LINE__,tty->driver->name, info->count);
 
        /* If port is closing, signal caller to try again */
        if (tty_hung_up_p(filp) || info->flags & ASYNC_CLOSING){
@@ -3605,7 +3605,7 @@ static int mgsl_open(struct tty_struct *tty, struct file * filp)
 
        if ((info->count == 1) &&
            info->flags & ASYNC_SPLIT_TERMIOS) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->normal_termios;
                else 
                        *tty->termios = info->callout_termios;
index d413d33416cb68080356abdeece8f2a1168aa06a..d93f6387377657138492e5eea2e3417a16004f1d 100644 (file)
@@ -740,7 +740,7 @@ static int open(struct tty_struct *tty, struct file *filp)
        int retval, line;
        unsigned long flags;
 
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= synclinkmp_device_count)) {
                printk("%s(%d): open with illegal line #%d.\n",
                        __FILE__,__LINE__,line);
@@ -769,7 +769,7 @@ static int open(struct tty_struct *tty, struct file *filp)
 
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):%s open(), old ref count = %d\n",
-                        __FILE__,__LINE__,tty->driver.name, info->count);
+                        __FILE__,__LINE__,tty->driver->name, info->count);
 
        /* If port is closing, signal caller to try again */
        if (tty_hung_up_p(filp) || info->flags & ASYNC_CLOSING){
@@ -808,7 +808,7 @@ static int open(struct tty_struct *tty, struct file *filp)
 
        if ((info->count == 1) &&
            info->flags & ASYNC_SPLIT_TERMIOS) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->normal_termios;
                else
                        *tty->termios = info->callout_termios;
@@ -895,8 +895,8 @@ static void close(struct tty_struct *tty, struct file *filp)
        if (info->flags & ASYNC_INITIALIZED)
                wait_until_sent(tty, info->timeout);
 
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
 
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
@@ -922,7 +922,7 @@ static void close(struct tty_struct *tty, struct file *filp)
 cleanup:
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):%s close() exit, count=%d\n", __FILE__,__LINE__,
-                       tty->driver.name, info->count);
+                       tty->driver->name, info->count);
 }
 
 /* Called by tty_hangup() when a hangup is signaled.
@@ -958,7 +958,7 @@ static void set_termios(struct tty_struct *tty, struct termios *old_termios)
 
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):%s set_termios()\n", __FILE__,__LINE__,
-                       tty->driver.name );
+                       tty->driver->name );
 
        /* just return if nothing has changed */
        if ((tty->termios->c_cflag == old_termios->c_cflag)
@@ -3199,9 +3199,9 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
 
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):%s block_til_ready()\n",
-                        __FILE__,__LINE__, tty->driver.name );
+                        __FILE__,__LINE__, tty->driver->name );
 
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                /* this is a callout device */
                /* just verify that normal device is not in use */
                if (info->flags & ASYNC_NORMAL_ACTIVE)
@@ -3247,7 +3247,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
 
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):%s block_til_ready() before block, count=%d\n",
-                        __FILE__,__LINE__, tty->driver.name, info->count );
+                        __FILE__,__LINE__, tty->driver->name, info->count );
 
        spin_lock_irqsave(&info->lock, flags);
        if (!tty_hung_up_p(filp)) {
@@ -3291,7 +3291,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
 
                if (debug_level >= DEBUG_LEVEL_INFO)
                        printk("%s(%d):%s block_til_ready() count=%d\n",
-                                __FILE__,__LINE__, tty->driver.name, info->count );
+                                __FILE__,__LINE__, tty->driver->name, info->count );
 
                schedule();
        }
@@ -3305,7 +3305,7 @@ static int block_til_ready(struct tty_struct *tty, struct file *filp,
 
        if (debug_level >= DEBUG_LEVEL_INFO)
                printk("%s(%d):%s block_til_ready() after, count=%d\n",
-                        __FILE__,__LINE__, tty->driver.name, info->count );
+                        __FILE__,__LINE__, tty->driver->name, info->count );
 
        if (!retval)
                info->flags |= ASYNC_NORMAL_ACTIVE;
index 3310d687c4bf9543501f4071a855e0d5c52202f1..225c3989bae7f48110fb7e0197a41a52da3814ce 100644 (file)
@@ -178,23 +178,23 @@ static inline void free_tty_struct(struct tty_struct *tty)
 static char *
 _tty_make_name(struct tty_struct *tty, const char *name, char *buf)
 {
-       int idx = (tty)? minor(tty->device) - tty->driver.minor_start:0;
+       int idx = (tty)? minor(tty->device) - tty->driver->minor_start:0;
 
        if (!tty) /* Hmm.  NULL pointer.  That's fun. */
                strcpy(buf, "NULL tty");
        else
                sprintf(buf, name,
-                       idx + tty->driver.name_base);
+                       idx + tty->driver->name_base);
                
        return buf;
 }
 
-#define TTY_NUMBER(tty) (minor((tty)->device) - (tty)->driver.minor_start + \
-                        (tty)->driver.name_base)
+#define TTY_NUMBER(tty) (minor((tty)->device) - (tty)->driver->minor_start + \
+                        (tty)->driver->name_base)
 
 char *tty_name(struct tty_struct *tty, char *buf)
 {
-       return _tty_make_name(tty, (tty)?tty->driver.name:NULL, buf);
+       return _tty_make_name(tty, (tty)?tty->driver->name:NULL, buf);
 }
 
 EXPORT_SYMBOL(tty_name);
@@ -231,8 +231,8 @@ static int check_tty_count(struct tty_struct *tty, const char *routine)
                count++;
        }
        file_list_unlock();
-       if (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
-           tty->driver.subtype == PTY_TYPE_SLAVE &&
+       if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
+           tty->driver->subtype == PTY_TYPE_SLAVE &&
            tty->link && tty->link->count)
                count++;
        if (tty->count != count) {
@@ -319,8 +319,8 @@ static int tty_set_ldisc(struct tty_struct *tty, int ldisc)
                module_put(o_ldisc.owner);
        }
        
-       if (tty->ldisc.num != o_ldisc.num && tty->driver.set_ldisc)
-               tty->driver.set_ldisc(tty);
+       if (tty->ldisc.num != o_ldisc.num && tty->driver->set_ldisc)
+               tty->driver->set_ldisc(tty);
        return retval;
 }
 
@@ -466,8 +466,8 @@ void do_tty_hangup(void *data)
                local_irq_save(flags); // FIXME: is this safe?
                if (tty->ldisc.flush_buffer)
                        tty->ldisc.flush_buffer(tty);
-               if (tty->driver.flush_buffer)
-                       tty->driver.flush_buffer(tty);
+               if (tty->driver->flush_buffer)
+                       tty->driver->flush_buffer(tty);
                if ((test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) &&
                    tty->ldisc.write_wakeup)
                        (tty->ldisc.write_wakeup)(tty);
@@ -481,8 +481,8 @@ void do_tty_hangup(void *data)
         * Shutdown the current line discipline, and reset it to
         * N_TTY.
         */
-       if (tty->driver.flags & TTY_DRIVER_RESET_TERMIOS)
-               *tty->termios = tty->driver.init_termios;
+       if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS)
+               *tty->termios = tty->driver->init_termios;
        if (tty->ldisc.num != ldiscs[N_TTY].num) {
                if (tty->ldisc.close)
                        (tty->ldisc.close)(tty);
@@ -525,11 +525,11 @@ void do_tty_hangup(void *data)
         *      So we just call close() the right number of times.
         */
        if (cons_filp) {
-               if (tty->driver.close)
+               if (tty->driver->close)
                        for (n = 0; n < closecount; n++)
-                               tty->driver.close(tty, cons_filp);
-       } else if (tty->driver.hangup)
-               (tty->driver.hangup)(tty);
+                               tty->driver->close(tty, cons_filp);
+       } else if (tty->driver->hangup)
+               (tty->driver->hangup)(tty);
        unlock_kernel();
 }
 
@@ -589,7 +589,7 @@ void disassociate_ctty(int on_exit)
        tty = current->tty;
        if (tty) {
                tty_pgrp = tty->pgrp;
-               if (on_exit && tty->driver.type != TTY_DRIVER_TYPE_PTY)
+               if (on_exit && tty->driver->type != TTY_DRIVER_TYPE_PTY)
                        tty_vhangup(tty);
        } else {
                if (current->tty_old_pgrp) {
@@ -626,8 +626,8 @@ void stop_tty(struct tty_struct *tty)
                tty->ctrl_status |= TIOCPKT_STOP;
                wake_up_interruptible(&tty->link->read_wait);
        }
-       if (tty->driver.stop)
-               (tty->driver.stop)(tty);
+       if (tty->driver->stop)
+               (tty->driver->stop)(tty);
 }
 
 void start_tty(struct tty_struct *tty)
@@ -640,8 +640,8 @@ void start_tty(struct tty_struct *tty)
                tty->ctrl_status |= TIOCPKT_START;
                wake_up_interruptible(&tty->link->read_wait);
        }
-       if (tty->driver.start)
-               (tty->driver.start)(tty);
+       if (tty->driver->start)
+               (tty->driver->start)(tty);
        if ((test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags)) &&
            tty->ldisc.write_wakeup)
                (tty->ldisc.write_wakeup)(tty);
@@ -768,7 +768,7 @@ static ssize_t tty_write(struct file * file, const char * buf, size_t count,
                tty = (struct tty_struct *)file->private_data;
        if (tty_paranoia_check(tty, inode->i_rdev, "tty_write"))
                return -EIO;
-       if (!tty || !tty->driver.write || (test_bit(TTY_IO_ERROR, &tty->flags)))
+       if (!tty || !tty->driver->write || (test_bit(TTY_IO_ERROR, &tty->flags)))
                return -EIO;
 #if 0
        if (!is_console && L_TOSTOP(tty) && (tty->pgrp > 0) &&
@@ -855,7 +855,7 @@ static int init_dev(kdev_t device, struct tty_struct **ret_tty)
                goto fail_no_mem;
        initialize_tty_struct(tty);
        tty->device = device;
-       tty->driver = *driver;
+       tty->driver = driver;
 
        tp_loc = &driver->termios[idx];
        if (!*tp_loc) {
@@ -882,7 +882,7 @@ static int init_dev(kdev_t device, struct tty_struct **ret_tty)
                initialize_tty_struct(o_tty);
                o_tty->device = mk_kdev(driver->other->major,
                                        driver->other->minor_start + idx);
-               o_tty->driver = *driver->other;
+               o_tty->driver = driver->other;
 
                o_tp_loc  = &driver->other->termios[idx];
                if (!*o_tp_loc) {
@@ -981,7 +981,7 @@ fast_track:
                tty->link->count++;
        }
        tty->count++;
-       tty->driver = *driver; /* N.B. why do this every time?? */
+       tty->driver = driver; /* N.B. why do this every time?? */
 
 success:
        *ret_tty = tty;
@@ -1026,32 +1026,32 @@ static void release_mem(struct tty_struct *tty, int idx)
        struct termios *tp;
 
        if ((o_tty = tty->link) != NULL) {
-               o_tty->driver.table[idx] = NULL;
-               if (o_tty->driver.flags & TTY_DRIVER_RESET_TERMIOS) {
-                       tp = o_tty->driver.termios[idx];
-                       o_tty->driver.termios[idx] = NULL;
+               o_tty->driver->table[idx] = NULL;
+               if (o_tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) {
+                       tp = o_tty->driver->termios[idx];
+                       o_tty->driver->termios[idx] = NULL;
                        kfree(tp);
                }
                o_tty->magic = 0;
-               (*o_tty->driver.refcount)--;
+               (*o_tty->driver->refcount)--;
                file_list_lock();
                list_del(&o_tty->tty_files);
                file_list_unlock();
                free_tty_struct(o_tty);
        }
 
-       tty->driver.table[idx] = NULL;
-       if (tty->driver.flags & TTY_DRIVER_RESET_TERMIOS) {
-               tp = tty->driver.termios[idx];
-               tty->driver.termios[idx] = NULL;
+       tty->driver->table[idx] = NULL;
+       if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) {
+               tp = tty->driver->termios[idx];
+               tty->driver->termios[idx] = NULL;
                kfree(tp);
        }
        tty->magic = 0;
-       (*tty->driver.refcount)--;
+       (*tty->driver->refcount)--;
        file_list_lock();
        list_del(&tty->tty_files);
        file_list_unlock();
-       module_put(tty->driver.owner);
+       module_put(tty->driver->owner);
        free_tty_struct(tty);
 }
 
@@ -1078,29 +1078,29 @@ static void release_dev(struct file * filp)
 
        tty_fasync(-1, filp, 0);
 
-       idx = minor(tty->device) - tty->driver.minor_start;
-       pty_master = (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
-                     tty->driver.subtype == PTY_TYPE_MASTER);
+       idx = minor(tty->device) - tty->driver->minor_start;
+       pty_master = (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
+                     tty->driver->subtype == PTY_TYPE_MASTER);
        o_tty = tty->link;
 
 #ifdef TTY_PARANOIA_CHECK
-       if (idx < 0 || idx >= tty->driver.num) {
+       if (idx < 0 || idx >= tty->driver->num) {
                printk(KERN_DEBUG "release_dev: bad idx when trying to "
                                  "free (%s)\n", cdevname(tty->device));
                return;
        }
-       if (tty != tty->driver.table[idx]) {
+       if (tty != tty->driver->table[idx]) {
                printk(KERN_DEBUG "release_dev: driver.table[%d] not tty "
                                  "for (%s)\n", idx, cdevname(tty->device));
                return;
        }
-       if (tty->termios != tty->driver.termios[idx]) {
+       if (tty->termios != tty->driver->termios[idx]) {
                printk(KERN_DEBUG "release_dev: driver.termios[%d] not termios "
                       "for (%s)\n",
                       idx, cdevname(tty->device));
                return;
        }
-       if (tty->termios_locked != tty->driver.termios_locked[idx]) {
+       if (tty->termios_locked != tty->driver->termios_locked[idx]) {
                printk(KERN_DEBUG "release_dev: driver.termios_locked[%d] not "
                       "termios_locked for (%s)\n",
                       idx, cdevname(tty->device));
@@ -1114,21 +1114,21 @@ static void release_dev(struct file * filp)
 #endif
 
 #ifdef TTY_PARANOIA_CHECK
-       if (tty->driver.other) {
-               if (o_tty != tty->driver.other->table[idx]) {
+       if (tty->driver->other) {
+               if (o_tty != tty->driver->other->table[idx]) {
                        printk(KERN_DEBUG "release_dev: other->table[%d] "
                                          "not o_tty for (%s)\n",
                               idx, cdevname(tty->device));
                        return;
                }
-               if (o_tty->termios != tty->driver.other->termios[idx]) {
+               if (o_tty->termios != tty->driver->other->termios[idx]) {
                        printk(KERN_DEBUG "release_dev: other->termios[%d] "
                                          "not o_termios for (%s)\n",
                               idx, cdevname(tty->device));
                        return;
                }
                if (o_tty->termios_locked != 
-                     tty->driver.other->termios_locked[idx]) {
+                     tty->driver->other->termios_locked[idx]) {
                        printk(KERN_DEBUG "release_dev: other->termios_locked["
                                          "%d] not o_termios_locked for (%s)\n",
                               idx, cdevname(tty->device));
@@ -1141,8 +1141,8 @@ static void release_dev(struct file * filp)
        }
 #endif
 
-       if (tty->driver.close)
-               tty->driver.close(tty, filp);
+       if (tty->driver->close)
+               tty->driver->close(tty, filp);
 
        /*
         * Sanity check: if tty->count is going to zero, there shouldn't be
@@ -1390,14 +1390,14 @@ retry_open:
        filp->private_data = tty;
        file_move(filp, &tty->tty_files);
        check_tty_count(tty, "tty_open");
-       if (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
-           tty->driver.subtype == PTY_TYPE_MASTER)
+       if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
+           tty->driver->subtype == PTY_TYPE_MASTER)
                noctty = 1;
 #ifdef TTY_DEBUG_HANGUP
        printk(KERN_DEBUG "opening %s...", tty_name(tty, buf));
 #endif
-       if (tty->driver.open)
-               retval = tty->driver.open(tty, filp);
+       if (tty->driver->open)
+               retval = tty->driver->open(tty, filp);
        else
                retval = -ENODEV;
        filp->f_flags = saved_flags;
@@ -1434,8 +1434,8 @@ retry_open:
                tty->session = current->session;
                tty->pgrp = current->pgrp;
        }
-       if ((tty->driver.type == TTY_DRIVER_TYPE_SERIAL) &&
-           (tty->driver.subtype == SERIAL_TYPE_CALLOUT) &&
+       if ((tty->driver->type == TTY_DRIVER_TYPE_SERIAL) &&
+           (tty->driver->subtype == SERIAL_TYPE_CALLOUT) &&
            (tty->count == 1)) {
                static int nr_warns;
                if (nr_warns < 5) {
@@ -1527,8 +1527,8 @@ static int tiocswinsz(struct tty_struct *tty, struct tty_struct *real_tty,
        if (!memcmp(&tmp_ws, &tty->winsize, sizeof(*arg)))
                return 0;
 #ifdef CONFIG_VT
-       if (tty->driver.type == TTY_DRIVER_TYPE_CONSOLE) {
-               unsigned int currcons = minor(tty->device) - tty->driver.minor_start;
+       if (tty->driver->type == TTY_DRIVER_TYPE_CONSOLE) {
+               unsigned int currcons = minor(tty->device) - tty->driver->minor_start;
                if (vc_resize(currcons, tmp_ws.ws_col, tmp_ws.ws_row))
                        return -ENXIO;
        }
@@ -1674,10 +1674,10 @@ static int send_break(struct tty_struct *tty, int duration)
 {
        set_current_state(TASK_INTERRUPTIBLE);
 
-       tty->driver.break_ctl(tty, -1);
+       tty->driver->break_ctl(tty, -1);
        if (!signal_pending(current))
                schedule_timeout(duration);
-       tty->driver.break_ctl(tty, 0);
+       tty->driver->break_ctl(tty, 0);
        if (signal_pending(current))
                return -EINTR;
        return 0;
@@ -1688,8 +1688,8 @@ tty_tiocmget(struct tty_struct *tty, struct file *file, unsigned long arg)
 {
        int retval = -EINVAL;
 
-       if (tty->driver.tiocmget) {
-               retval = tty->driver.tiocmget(tty, file);
+       if (tty->driver->tiocmget) {
+               retval = tty->driver->tiocmget(tty, file);
 
                if (retval >= 0)
                        retval = put_user(retval, (int *)arg);
@@ -1703,7 +1703,7 @@ tty_tiocmset(struct tty_struct *tty, struct file *file, unsigned int cmd,
 {
        int retval = -EINVAL;
 
-       if (tty->driver.tiocmset) {
+       if (tty->driver->tiocmset) {
                unsigned int set, clear, val;
 
                retval = get_user(val, (unsigned int *)arg);
@@ -1727,7 +1727,7 @@ tty_tiocmset(struct tty_struct *tty, struct file *file, unsigned int cmd,
                set &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2;
                clear &= TIOCM_DTR|TIOCM_RTS|TIOCM_OUT1|TIOCM_OUT2;
 
-               retval = tty->driver.tiocmset(tty, file, set, clear);
+               retval = tty->driver->tiocmset(tty, file, set, clear);
        }
        return retval;
 }
@@ -1746,28 +1746,28 @@ int tty_ioctl(struct inode * inode, struct file * file,
                return -EINVAL;
 
        real_tty = tty;
-       if (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
-           tty->driver.subtype == PTY_TYPE_MASTER)
+       if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
+           tty->driver->subtype == PTY_TYPE_MASTER)
                real_tty = tty->link;
 
        /*
         * Break handling by driver
         */
-       if (!tty->driver.break_ctl) {
+       if (!tty->driver->break_ctl) {
                switch(cmd) {
                case TIOCSBRK:
                case TIOCCBRK:
-                       if (tty->driver.ioctl)
-                               return tty->driver.ioctl(tty, file, cmd, arg);
+                       if (tty->driver->ioctl)
+                               return tty->driver->ioctl(tty, file, cmd, arg);
                        return -EINVAL;
                        
                /* These two ioctl's always return success; even if */
                /* the driver doesn't support them. */
                case TCSBRK:
                case TCSBRKP:
-                       if (!tty->driver.ioctl)
+                       if (!tty->driver->ioctl)
                                return 0;
-                       retval = tty->driver.ioctl(tty, file, cmd, arg);
+                       retval = tty->driver->ioctl(tty, file, cmd, arg);
                        if (retval == -ENOIOCTLCMD)
                                retval = 0;
                        return retval;
@@ -1840,11 +1840,11 @@ int tty_ioctl(struct inode * inode, struct file * file,
                 * Break handling
                 */
                case TIOCSBRK:  /* Turn break on, unconditionally */
-                       tty->driver.break_ctl(tty, -1);
+                       tty->driver->break_ctl(tty, -1);
                        return 0;
                        
                case TIOCCBRK:  /* Turn break off, unconditionally */
-                       tty->driver.break_ctl(tty, 0);
+                       tty->driver->break_ctl(tty, 0);
                        return 0;
                case TCSBRK:   /* SVID version: non-zero arg --> no break */
                        /*
@@ -1866,8 +1866,8 @@ int tty_ioctl(struct inode * inode, struct file * file,
                case TIOCMBIS:
                        return tty_tiocmset(tty, file, cmd, arg);
        }
-       if (tty->driver.ioctl) {
-               int retval = (tty->driver.ioctl)(tty, file, cmd, arg);
+       if (tty->driver->ioctl) {
+               int retval = (tty->driver->ioctl)(tty, file, cmd, arg);
                if (retval != -ENOIOCTLCMD)
                        return retval;
        }
@@ -1917,8 +1917,8 @@ static void __do_SAK(void *arg)
        session  = tty->session;
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        read_lock(&tasklist_lock);
        for_each_task_pid(session, PIDTYPE_SID, p, l, pid) {
                if (p->tty == tty || session > 0) {
@@ -2098,7 +2098,7 @@ static void initialize_tty_struct(struct tty_struct *tty)
  */
 static void tty_default_put_char(struct tty_struct *tty, unsigned char ch)
 {
-       tty->driver.write(tty, 0, &ch, 1);
+       tty->driver->write(tty, 0, &ch, 1);
 }
 
 #ifdef CONFIG_DEVFS_FS
index e89b692a2dedf3af46df8f6a87f081488bb2bd3f..ad98940d49ecef1e69da2f4b6d416b5f38a1a9f6 100644 (file)
@@ -45,7 +45,7 @@ void tty_wait_until_sent(struct tty_struct * tty, long timeout)
        
        printk(KERN_DEBUG "%s wait until sent...\n", tty_name(tty, buf));
 #endif
-       if (!tty->driver.chars_in_buffer)
+       if (!tty->driver->chars_in_buffer)
                return;
        add_wait_queue(&tty->write_wait, &wait);
        if (!timeout)
@@ -53,17 +53,17 @@ void tty_wait_until_sent(struct tty_struct * tty, long timeout)
        do {
 #ifdef TTY_DEBUG_WAIT_UNTIL_SENT
                printk(KERN_DEBUG "waiting %s...(%d)\n", tty_name(tty, buf),
-                      tty->driver.chars_in_buffer(tty));
+                      tty->driver->chars_in_buffer(tty));
 #endif
                set_current_state(TASK_INTERRUPTIBLE);
                if (signal_pending(current))
                        goto stop_waiting;
-               if (!tty->driver.chars_in_buffer(tty))
+               if (!tty->driver->chars_in_buffer(tty))
                        break;
                timeout = schedule_timeout(timeout);
        } while (timeout);
-       if (tty->driver.wait_until_sent)
-               tty->driver.wait_until_sent(tty, timeout);
+       if (tty->driver->wait_until_sent)
+               tty->driver->wait_until_sent(tty, timeout);
 stop_waiting:
        set_current_state(TASK_RUNNING);
        remove_wait_queue(&tty->write_wait, &wait);
@@ -131,8 +131,8 @@ static void change_termios(struct tty_struct * tty, struct termios * new_termios
                }
        }
 
-       if (tty->driver.set_termios)
-               (*tty->driver.set_termios)(tty, &old_termios);
+       if (tty->driver->set_termios)
+               (*tty->driver->set_termios)(tty, &old_termios);
 
        if (tty->ldisc.set_termios)
                (*tty->ldisc.set_termios)(tty, &old_termios);
@@ -346,13 +346,13 @@ void send_prio_char(struct tty_struct *tty, char ch)
 {
        int     was_stopped = tty->stopped;
 
-       if (tty->driver.send_xchar) {
-               tty->driver.send_xchar(tty, ch);
+       if (tty->driver->send_xchar) {
+               tty->driver->send_xchar(tty, ch);
                return;
        }
        if (was_stopped)
                start_tty(tty);
-       tty->driver.write(tty, 0, &ch, 1);
+       tty->driver->write(tty, 0, &ch, 1);
        if (was_stopped)
                stop_tty(tty);
 }
@@ -363,8 +363,8 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file,
        struct tty_struct * real_tty;
        int retval;
 
-       if (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
-           tty->driver.subtype == PTY_TYPE_MASTER)
+       if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
+           tty->driver->subtype == PTY_TYPE_MASTER)
                real_tty = tty->link;
        else
                real_tty = tty;
@@ -450,16 +450,16 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file,
                                        tty->ldisc.flush_buffer(tty);
                                /* fall through */
                        case TCOFLUSH:
-                               if (tty->driver.flush_buffer)
-                                       tty->driver.flush_buffer(tty);
+                               if (tty->driver->flush_buffer)
+                                       tty->driver->flush_buffer(tty);
                                break;
                        default:
                                return -EINVAL;
                        }
                        return 0;
                case TIOCOUTQ:
-                       return put_user(tty->driver.chars_in_buffer ?
-                                       tty->driver.chars_in_buffer(tty) : 0,
+                       return put_user(tty->driver->chars_in_buffer ?
+                                       tty->driver->chars_in_buffer(tty) : 0,
                                        (int *) arg);
                case TIOCINQ:
                        retval = tty->read_cnt;
@@ -482,8 +482,8 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file,
                {
                        int pktmode;
 
-                       if (tty->driver.type != TTY_DRIVER_TYPE_PTY ||
-                           tty->driver.subtype != PTY_TYPE_MASTER)
+                       if (tty->driver->type != TTY_DRIVER_TYPE_PTY ||
+                           tty->driver->subtype != PTY_TYPE_MASTER)
                                return -ENOTTY;
                        if (get_user(pktmode, (int *) arg))
                                return -EFAULT;
index 95cc54d04ed42c9435cc95990291655da36b9a4b..6ad591fe45b5144606cc69b5de12daf74f3425f5 100644 (file)
@@ -950,7 +950,7 @@ static int scc_open (struct tty_struct * tty, struct file * filp)
        }
 
        if ((port->gs.count == 1) && (port->gs.flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = port->gs.normal_termios;
                else 
                        *tty->termios = port->gs.callout_termios;
index cb7f1ccd1b87e532d0362fe6762dd92b59426ddb..6f2f354290988476ef5a3cdd29714cb41bdc9ce2 100644 (file)
@@ -2216,7 +2216,7 @@ int tioclinux(struct tty_struct *tty, unsigned long arg)
        int lines;
        int ret;
 
-       if (tty->driver.type != TTY_DRIVER_TYPE_CONSOLE)
+       if (tty->driver->type != TTY_DRIVER_TYPE_CONSOLE)
                return -EINVAL;
        if (current->tty != tty && !capable(CAP_SYS_ADMIN))
                return -EPERM;
@@ -2345,7 +2345,7 @@ static void con_stop(struct tty_struct *tty)
        int console_num;
        if (!tty)
                return;
-       console_num = minor(tty->device) - (tty->driver.minor_start);
+       console_num = minor(tty->device) - (tty->driver->minor_start);
        if (!vc_cons_allocated(console_num))
                return;
        set_vc_kbd_led(kbd_table + console_num, VC_SCROLLOCK);
@@ -2360,7 +2360,7 @@ static void con_start(struct tty_struct *tty)
        int console_num;
        if (!tty)
                return;
-       console_num = minor(tty->device) - (tty->driver.minor_start);
+       console_num = minor(tty->device) - (tty->driver->minor_start);
        if (!vc_cons_allocated(console_num))
                return;
        clr_vc_kbd_led(kbd_table + console_num, VC_SCROLLOCK);
@@ -2392,7 +2392,7 @@ static int con_open(struct tty_struct *tty, struct file * filp)
        unsigned int    currcons;
        int i;
 
-       currcons = minor(tty->device) - tty->driver.minor_start;
+       currcons = minor(tty->device) - tty->driver->minor_start;
 
        i = vc_allocate(currcons);
        if (i)
@@ -2418,7 +2418,7 @@ static void con_close(struct tty_struct *tty, struct file * filp)
        if (!tty)
                return;
        if (tty->count != 1) return;
-       vcs_make_devfs (minor(tty->device) - tty->driver.minor_start, 1);
+       vcs_make_devfs (minor(tty->device) - tty->driver->minor_start, 1);
        vt = (struct vt_struct*)tty->driver_data;
        if (vt)
                vc_cons[vt->vc_num].d->vc_tty = NULL;
index 87c1eaa12b21104a7ea89699227d4da55282be0d..494e1f5c11eebad89dc2fff726aad073162c406e 100644 (file)
@@ -44,7 +44,7 @@ char serport_name[] = "Serial port";
 static int serport_serio_write(struct serio *serio, unsigned char data)
 {
        struct serport *serport = serio->driver;
-       return -(serport->tty->driver.write(serport->tty, 0, &data, 1) != 1);
+       return -(serport->tty->driver->write(serport->tty, 0, &data, 1) != 1);
 }
 
 static int serport_serio_open(struct serio *serio)
index 0053c471fb16afb40c6252afc10e4843c053e820..6cc72a2762c767a4c7f3ed78b10ff86571d052eb 100644 (file)
@@ -1655,7 +1655,7 @@ isdn_tty_block_til_ready(struct tty_struct *tty, struct file *filp, modem_info *
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == ISDN_SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == ISDN_SERIAL_TYPE_CALLOUT) {
                if (info->flags & ISDN_ASYNC_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((info->flags & ISDN_ASYNC_CALLOUT_ACTIVE) &&
@@ -1766,14 +1766,14 @@ isdn_tty_open(struct tty_struct *tty, struct file *filp)
 
        MOD_INC_USE_COUNT;
 
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if (line < 0 || line > ISDN_MAX_CHANNELS)
                return -ENODEV;
        info = &isdn_mdm.info[line];
        if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_open"))
                return -ENODEV;
 #ifdef ISDN_DEBUG_MODEM_OPEN
-       printk(KERN_DEBUG "isdn_tty_open %s%d, count = %d\n", tty->driver.name,
+       printk(KERN_DEBUG "isdn_tty_open %s%d, count = %d\n", tty->driver->name,
               info->line, info->count);
 #endif
        info->count++;
@@ -1797,7 +1797,7 @@ isdn_tty_open(struct tty_struct *tty, struct file *filp)
                return retval;
        }
        if ((info->count == 1) && (info->flags & ISDN_ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == ISDN_SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == ISDN_SERIAL_TYPE_NORMAL)
                        *tty->termios = info->normal_termios;
                else
                        *tty->termios = info->callout_termios;
@@ -1892,8 +1892,8 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
        }
        dev->modempoll--;
        isdn_tty_shutdown(info);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        info->tty = 0;
index 374d9ee89270225fb910312c5a204cfa204b650c..f447ac31d627ee1c6b470eaa8acf24fd579a6acd 100644 (file)
@@ -2003,8 +2003,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
           specific irqs */
        spin_unlock_irqrestore(&info->lock, flags);
 
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
@@ -2120,7 +2120,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & ZILOG_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((info->flags & ZILOG_CALLOUT_ACTIVE) &&
@@ -2229,7 +2229,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
        unsigned long           page;
 
        MOD_INC_USE_COUNT;
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= zs_channels_found)) {
                MOD_DEC_USE_COUNT;
                return -ENODEV;
@@ -2244,7 +2244,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
 #endif
        if (serial_paranoia_check(info, tty->device, "rs_open"))
                return -ENODEV;
-       OPNDBG("rs_open %s%d, count = %d, tty=%p\n", tty->driver.name,
+       OPNDBG("rs_open %s%d, count = %d, tty=%p\n", tty->driver->name,
               info->line, info->count, tty);
 
        info->count++;
@@ -2292,7 +2292,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
        }
 
        if ((info->count == 1) && (info->flags & ZILOG_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->normal_termios;
                else 
                        *tty->termios = info->callout_termios;
index 38b55e119c90c5f450023ab3e3ef3b17be8888ef..61f2e29f066b5b884bc0eee33167c3666757dedf 100644 (file)
@@ -315,13 +315,13 @@ static void sp_encaps(struct sixpack *sp, unsigned char *icp, int len)
                   immediately after data has arrived. */
                if (sp->duplex == 1) {
                        sp->led_state = 0x70;
-                       sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+                       sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
                        sp->tx_enable = 1;
-                       actual = sp->tty->driver.write(sp->tty, 0, sp->xbuff, count);
+                       actual = sp->tty->driver->write(sp->tty, 0, sp->xbuff, count);
                        sp->xleft = count - actual;
                        sp->xhead = sp->xbuff + actual;
                        sp->led_state = 0x60;
-                       sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+                       sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
                } else {
                        sp->xleft = count;
                        sp->xhead = sp->xbuff;
@@ -357,7 +357,7 @@ static void sixpack_write_wakeup(struct tty_struct *tty)
        }
 
        if (sp->tx_enable == 1) {
-               actual = tty->driver.write(tty, 0, sp->xhead, sp->xleft);
+               actual = tty->driver->write(tty, 0, sp->xhead, sp->xleft);
                sp->xleft -= actual;
                sp->xhead += actual;
        }
@@ -394,13 +394,13 @@ static void sp_xmit_on_air(unsigned long channel)
 
        if (((sp->status1 & SIXP_DCD_MASK) == 0) && (random < sp->persistence)) {
                sp->led_state = 0x70;
-               sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+               sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
                sp->tx_enable = 1;
-               actual = sp->tty->driver.write(sp->tty, 0, sp->xbuff, sp->status2);
+               actual = sp->tty->driver->write(sp->tty, 0, sp->xbuff, sp->status2);
                sp->xleft -= actual;
                sp->xhead += actual;
                sp->led_state = 0x60;
-               sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+               sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
                sp->status2 = 0;
        } else
                sp_start_tx_timer(sp);
@@ -566,8 +566,8 @@ static int sixpack_open(struct tty_struct *tty)
                return -ENFILE;
        sp->tty = tty;
        tty->disc_data = sp;
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
 
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
@@ -882,7 +882,7 @@ static int tnc_init(struct sixpack *sp)
 {
        unsigned char inbyte = 0xe8;
 
-       sp->tty->driver.write(sp->tty, 0, &inbyte, 1);
+       sp->tty->driver->write(sp->tty, 0, &inbyte, 1);
 
        del_timer(&sp->resync_t);
        sp->resync_t.data = (unsigned long) sp;
@@ -924,9 +924,9 @@ static void decode_prio_command(unsigned char cmd, struct sixpack *sp)
        else { /* output watchdog char if idle */
                if ((sp->status2 != 0) && (sp->duplex == 1)) {
                        sp->led_state = 0x70;
-                       sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+                       sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
                        sp->tx_enable = 1;
-                       actual = sp->tty->driver.write(sp->tty, 0, sp->xbuff, sp->status2);
+                       actual = sp->tty->driver->write(sp->tty, 0, sp->xbuff, sp->status2);
                        sp->xleft -= actual;
                        sp->xhead += actual;
                        sp->led_state = 0x60;
@@ -936,7 +936,7 @@ static void decode_prio_command(unsigned char cmd, struct sixpack *sp)
        }
 
        /* needed to trigger the TNC watchdog */
-       sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+       sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
 
         /* if the state byte has been received, the TNC is present,
            so the resync timer can be reset. */
@@ -977,8 +977,8 @@ static void resync_tnc(unsigned long channel)
        /* resync the TNC */
 
        sp->led_state = 0x60;
-       sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
-       sp->tty->driver.write(sp->tty, 0, &resync_cmd, 1);
+       sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
+       sp->tty->driver->write(sp->tty, 0, &resync_cmd, 1);
 
 
        /* Start resync timer again -- the TNC might be still absent */
@@ -1006,12 +1006,12 @@ static void decode_std_command(unsigned char cmd, struct sixpack *sp)
                                if ((sp->status & SIXP_RX_DCD_MASK) ==
                                        SIXP_RX_DCD_MASK) {
                                        sp->led_state = 0x68;
-                                       sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+                                       sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
                                }
                        } else {
                                sp->led_state = 0x60;
                                /* fill trailing bytes with zeroes */
-                               sp->tty->driver.write(sp->tty, 0, &sp->led_state, 1);
+                               sp->tty->driver->write(sp->tty, 0, &sp->led_state, 1);
                                rest = sp->rx_count;
                                if (rest != 0)
                                         for (i = rest; i <= 3; i++)
index 68ef2d9bf9878645a44aca3d4dadd2e6d0f90260..8670b1d487635fe3f096c43109b6c560ac1805d7 100644 (file)
@@ -384,7 +384,7 @@ static void ax_encaps(struct ax_disp *ax, unsigned char *icp, int len)
                         break;
                }
                ax->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
-               actual = ax->tty->driver.write(ax->tty, 0, ax->xbuff, count);
+               actual = ax->tty->driver->write(ax->tty, 0, ax->xbuff, count);
                ax->tx_packets++;
                ax->dev->trans_start = jiffies;
                ax->xleft = count - actual;
@@ -392,7 +392,7 @@ static void ax_encaps(struct ax_disp *ax, unsigned char *icp, int len)
        } else {
                count = kiss_esc(p, (unsigned char *) ax->mkiss->xbuff, len);
                ax->mkiss->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
-               actual = ax->mkiss->tty->driver.write(ax->mkiss->tty, 0, ax->mkiss->xbuff, count);
+               actual = ax->mkiss->tty->driver->write(ax->mkiss->tty, 0, ax->mkiss->xbuff, count);
                ax->tx_packets++;
                ax->mkiss->dev->trans_start = jiffies;
                ax->mkiss->xleft = count - actual;
@@ -429,7 +429,7 @@ static void ax25_write_wakeup(struct tty_struct *tty)
                return;
        }
 
-       actual = tty->driver.write(tty, 0, ax->xhead, ax->xleft);
+       actual = tty->driver->write(tty, 0, ax->xhead, ax->xleft);
        ax->xleft -= actual;
        ax->xhead += actual;
 }
@@ -475,7 +475,7 @@ static int ax_xmit(struct sk_buff *skb, struct net_device *dev)
                }
 
                printk(KERN_ERR "mkiss: %s: transmit timed out, %s?\n", dev->name,
-                      (ax->tty->driver.chars_in_buffer(ax->tty) || ax->xleft) ?
+                      (ax->tty->driver->chars_in_buffer(ax->tty) || ax->xleft) ?
                       "bad line quality" : "driver error");
 
                ax->xleft = 0;
@@ -643,8 +643,8 @@ static int ax25_open(struct tty_struct *tty)
        ax->mkiss = NULL;
        tmp_ax    = NULL;
 
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
 
index 90cb66d944c3eb565cd592040c7082c198bcbee6..6824a613a05c3c353f8f58012e5ffbbad841c1cd 100644 (file)
@@ -62,7 +62,7 @@ static int irtty_chars_in_buffer(struct sir_dev *dev)
        ASSERT(priv != NULL, return -1;);
        ASSERT(priv->magic == IRTTY_MAGIC, return -1;);
 
-       return priv->tty->driver.chars_in_buffer(priv->tty);
+       return priv->tty->driver->chars_in_buffer(priv->tty);
 }
 
 /* Wait (sleep) until underlaying hardware finished transmission
@@ -91,9 +91,9 @@ static void irtty_wait_until_sent(struct sir_dev *dev)
        ASSERT(priv->magic == IRTTY_MAGIC, return;);
 
        tty = priv->tty;
-       if (tty->driver.wait_until_sent) {
+       if (tty->driver->wait_until_sent) {
                lock_kernel();
-               tty->driver.wait_until_sent(tty, MSECS_TO_JIFFIES(100));
+               tty->driver->wait_until_sent(tty, MSECS_TO_JIFFIES(100));
                unlock_kernel();
        }
        else {
@@ -161,8 +161,8 @@ static int irtty_change_speed(struct sir_dev *dev, unsigned speed)
        }       
 
        tty->termios->c_cflag = cflag;
-       if (tty->driver.set_termios)
-               tty->driver.set_termios(tty, &old_termios);
+       if (tty->driver->set_termios)
+               tty->driver->set_termios(tty, &old_termios);
        unlock_kernel();
 
        priv->io.speed = speed;
@@ -201,8 +201,8 @@ static int irtty_set_dtr_rts(struct sir_dev *dev, int dtr, int rts)
         * This function is not yet defined for all tty driver, so
         * let's be careful... Jean II
         */
-       ASSERT(priv->tty->driver.tiocmset != NULL, return -1;);
-       priv->tty->driver.tiocmset(priv->tty, NULL, set, clear);
+       ASSERT(priv->tty->driver->tiocmset != NULL, return -1;);
+       priv->tty->driver->tiocmset(priv->tty, NULL, set, clear);
 
        return 0;
 }
@@ -231,17 +231,17 @@ static int irtty_do_write(struct sir_dev *dev, const unsigned char *ptr, size_t
        ASSERT(priv->magic == IRTTY_MAGIC, return -1;);
 
        tty = priv->tty;
-       if (!tty->driver.write)
+       if (!tty->driver->write)
                return 0;
        tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
-       if (tty->driver.write_room) {
-               writelen = tty->driver.write_room(tty);
+       if (tty->driver->write_room) {
+               writelen = tty->driver->write_room(tty);
                if (writelen > len)
                        writelen = len;
        }
        else
                writelen = len;
-       return tty->driver.write(tty, 0, ptr, writelen);
+       return tty->driver->write(tty, 0, ptr, writelen);
 }
 
 /* ------------------------------------------------------- */
@@ -354,8 +354,8 @@ static inline void irtty_stop_receiver(struct tty_struct *tty, int stop)
                cflag |= CREAD;
 
        tty->termios->c_cflag = cflag;
-       if (tty->driver.set_termios)
-               tty->driver.set_termios(tty, &old_termios);
+       if (tty->driver->set_termios)
+               tty->driver->set_termios(tty, &old_termios);
        unlock_kernel();
 }
 
@@ -381,8 +381,8 @@ static int irtty_start_dev(struct sir_dev *dev)
 
        tty = priv->tty;
 
-       if (tty->driver.start)
-               tty->driver.start(tty);
+       if (tty->driver->start)
+               tty->driver->start(tty);
        /* Make sure we can receive more data */
        irtty_stop_receiver(tty, FALSE);
 
@@ -410,8 +410,8 @@ static int irtty_stop_dev(struct sir_dev *dev)
 
        /* Make sure we don't receive more data */
        irtty_stop_receiver(tty, TRUE);
-       if (tty->driver.stop)
-               tty->driver.stop(tty);
+       if (tty->driver->stop)
+               tty->driver->stop(tty);
 
        up(&irtty_sem);
 
@@ -522,11 +522,11 @@ static int irtty_open(struct tty_struct *tty)
 
        /* stop the underlying  driver */
        irtty_stop_receiver(tty, TRUE);
-       if (tty->driver.stop)
-               tty->driver.stop(tty);
+       if (tty->driver->stop)
+               tty->driver->stop(tty);
 
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        
 /* from old irtty - but what is it good for?
  * we _are_ the ldisc and we _don't_ implement flush_buffer!
@@ -538,15 +538,15 @@ static int irtty_open(struct tty_struct *tty)
 
        /* create device name - could we use tty_name() here? */
 
-       if (strchr(tty->driver.name, '%')) {
-               sprintf(hwname, tty->driver.name,
-                       minor(tty->device) - tty->driver.minor_start +
-                       tty->driver.name_base);
+       if (strchr(tty->driver->name, '%')) {
+               sprintf(hwname, tty->driver->name,
+                       minor(tty->device) - tty->driver->minor_start +
+                       tty->driver->name_base);
        }
        else {
-               sprintf(hwname, "%s%d", tty->driver.name,
-                       minor(tty->device) - tty->driver.minor_start +
-                       tty->driver.name_base);
+               sprintf(hwname, "%s%d", tty->driver->name,
+                       minor(tty->device) - tty->driver->minor_start +
+                       tty->driver->name_base);
        }
 
        /* apply mtt override */
@@ -625,8 +625,8 @@ static void irtty_close(struct tty_struct *tty)
        /* Stop tty */
        irtty_stop_receiver(tty, TRUE);
        tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
-       if (tty->driver.stop)
-               tty->driver.stop(tty);
+       if (tty->driver->stop)
+               tty->driver->stop(tty);
 
        kfree(priv);
 
index 75f2d5fe9d30d24ba9a8644190e4fbb0f098c16e..4c6d89c222bad7ceac47592a34c4d7ee8cca284b 100644 (file)
@@ -170,14 +170,14 @@ static int irtty_open(struct tty_struct *tty)
        tty->disc_data = self;
 
        /* Give self a name */
-       sprintf(name, "%s%d", tty->driver.name,
-               minor(tty->device) - tty->driver.minor_start +
-               tty->driver.name_base);
+       sprintf(name, "%s%d", tty->driver->name,
+               minor(tty->device) - tty->driver->minor_start +
+               tty->driver->name_base);
 
        hashbin_insert(irtty, (irda_queue_t *) self, (int) self, NULL);
 
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
@@ -335,7 +335,7 @@ static void irtty_stop_receiver(struct irtty_cb *self, int stop)
 
        /* This is unsafe, but currently under discussion - Jean II */
        self->tty->termios->c_cflag = cflag;
-       self->tty->driver.set_termios(self->tty, &old_termios);
+       self->tty->driver->set_termios(self->tty, &old_termios);
 }
 
 /* 
@@ -388,7 +388,7 @@ static void __irtty_change_speed(struct irtty_cb *self, __u32 speed)
 
        /* This is unsafe, but currently under discussion - Jean II */
        self->tty->termios->c_cflag = cflag;
-       self->tty->driver.set_termios(self->tty, &old_termios);
+       self->tty->driver->set_termios(self->tty, &old_termios);
 
        self->io.speed = speed;
 }
@@ -429,7 +429,7 @@ static int irtty_change_speed(struct irda_task *task)
                 * Make sure all data is sent before changing the speed of the
                 * serial port.
                 */
-               if (self->tty->driver.chars_in_buffer(self->tty)) {
+               if (self->tty->driver->chars_in_buffer(self->tty)) {
                        /* Keep state, and try again later */
                        ret = MSECS_TO_JIFFIES(10);
                        break;
@@ -684,8 +684,8 @@ static int irtty_hard_xmit(struct sk_buff *skb, struct net_device *dev)
        dev->trans_start = jiffies;
        self->stats.tx_bytes += self->tx_buff.len;
 
-       if (self->tty->driver.write)
-               actual = self->tty->driver.write(self->tty, 0, 
+       if (self->tty->driver->write)
+               actual = self->tty->driver->write(self->tty, 0, 
                                                 self->tx_buff.data, 
                                                 self->tx_buff.len);
        /* Hide the part we just transmitted */
@@ -738,7 +738,7 @@ static void irtty_write_wakeup(struct tty_struct *tty)
        /* Finished with frame?  */
        if (self->tx_buff.len > 0)  {
                /* Write data left in transmit buffer */
-               actual = tty->driver.write(tty, 0, self->tx_buff.data, 
+               actual = tty->driver->write(tty, 0, self->tx_buff.data, 
                                           self->tx_buff.len);
 
                self->tx_buff.data += actual;
@@ -823,7 +823,7 @@ static int irtty_set_dtr_rts(struct net_device *dev, int dtr, int rts)
        set_fs(get_ds());
        
        /* This is probably unsafe, but currently under discussion - Jean II */
-       if (tty->driver.ioctl(tty, NULL, TIOCMSET, (unsigned long) &arg)) { 
+       if (tty->driver->ioctl(tty, NULL, TIOCMSET, (unsigned long) &arg)) { 
                IRDA_DEBUG(2, "%s(), error doing ioctl!\n", __FUNCTION__);
        }
        set_fs(fs);
@@ -923,8 +923,8 @@ static int irtty_raw_write(struct net_device *dev, __u8 *buf, int len)
        ASSERT(self != NULL, return 0;);
        ASSERT(self->magic == IRTTY_MAGIC, return 0;);
 
-       if (self->tty->driver.write)
-               actual = self->tty->driver.write(self->tty, 0, buf, len);
+       if (self->tty->driver->write)
+               actual = self->tty->driver->write(self->tty, 0, buf, len);
 
        return actual;
 }
@@ -957,9 +957,9 @@ static int irtty_net_open(struct net_device *dev)
        irtty_stop_receiver(self, FALSE);
 
        /* Give self a hardware name */
-       sprintf(hwname, "%s%d", tty->driver.name,
-               minor(tty->device) - tty->driver.minor_start +
-               tty->driver.name_base);
+       sprintf(hwname, "%s%d", tty->driver->name,
+               minor(tty->device) - tty->driver->minor_start +
+               tty->driver->name_base);
 
        /* 
         * Open new IrLAP layer instance, now that everything should be
index 293c6a11e37475be22c0eba64ab48d3095d52a50..13185a72a2d251a9e86e5072393d703f210ac06f 100644 (file)
@@ -332,8 +332,8 @@ ppp_asynctty_receive(struct tty_struct *tty, const unsigned char *buf,
        spin_unlock_bh(&ap->recv_lock);
        ap_put(ap);
        if (test_and_clear_bit(TTY_THROTTLED, &tty->flags)
-           && tty->driver.unthrottle)
-               tty->driver.unthrottle(tty);
+           && tty->driver->unthrottle)
+               tty->driver->unthrottle(tty);
 }
 
 static void
@@ -662,7 +662,7 @@ ppp_async_push(struct asyncppp *ap)
                if (!tty_stuffed && ap->optr < ap->olim) {
                        avail = ap->olim - ap->optr;
                        set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
-                       sent = tty->driver.write(tty, 0, ap->optr, avail);
+                       sent = tty->driver->write(tty, 0, ap->optr, avail);
                        if (sent < 0)
                                goto flush;     /* error, e.g. loss of CD */
                        ap->optr += sent;
index a6f8788b7d1fa2ce1c13ed6e4ea6f7f6c836fce9..c4c6e0d13d4173606eedfcfad5e402fc3e089068 100644 (file)
@@ -385,8 +385,8 @@ ppp_sync_receive(struct tty_struct *tty, const unsigned char *buf,
        spin_unlock_bh(&ap->recv_lock);
        sp_put(ap);
        if (test_and_clear_bit(TTY_THROTTLED, &tty->flags)
-           && tty->driver.unthrottle)
-               tty->driver.unthrottle(tty);
+           && tty->driver->unthrottle)
+               tty->driver->unthrottle(tty);
 }
 
 static void
@@ -610,7 +610,7 @@ ppp_sync_push(struct syncppp *ap)
                        tty_stuffed = 0;
                if (!tty_stuffed && ap->tpkt != 0) {
                        set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
-                       sent = tty->driver.write(tty, 0, ap->tpkt->data, ap->tpkt->len);
+                       sent = tty->driver->write(tty, 0, ap->tpkt->data, ap->tpkt->len);
                        if (sent < 0)
                                goto flush;     /* error, e.g. loss of CD */
                        if (sent < ap->tpkt->len) {
index f146ae868c22cb02d20d64212f48ae026bcfd763..5a437dca6e77551bbbf85e1b8290ad12a3fdbb37 100644 (file)
@@ -428,7 +428,7 @@ sl_encaps(struct slip *sl, unsigned char *icp, int len)
         *       14 Oct 1994  Dmitry Gorodchanin.
         */
        sl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
-       actual = sl->tty->driver.write(sl->tty, 0, sl->xbuff, count);
+       actual = sl->tty->driver->write(sl->tty, 0, sl->xbuff, count);
 #ifdef SL_CHECK_TRANSMIT
        sl->dev->trans_start = jiffies;
 #endif
@@ -462,7 +462,7 @@ static void slip_write_wakeup(struct tty_struct *tty)
                return;
        }
 
-       actual = tty->driver.write(tty, 0, sl->xhead, sl->xleft);
+       actual = tty->driver->write(tty, 0, sl->xhead, sl->xleft);
        sl->xleft -= actual;
        sl->xhead += actual;
 }
@@ -488,7 +488,7 @@ static void sl_tx_timeout(struct net_device *dev)
                        goto out;
                }
                printk(KERN_WARNING "%s: transmit timed out, %s?\n", dev->name,
-                      (sl->tty->driver.chars_in_buffer(sl->tty) || sl->xleft) ?
+                      (sl->tty->driver->chars_in_buffer(sl->tty) || sl->xleft) ?
                       "bad line quality" : "driver error");
                sl->xleft = 0;
                sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
@@ -861,8 +861,8 @@ slip_open(struct tty_struct *tty)
        tty->disc_data = sl;
        sl->line = tty->device;
        sl->pid = current->pid;
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
 
@@ -1456,7 +1456,7 @@ static void sl_outfill(unsigned long sls)
                        if (!netif_queue_stopped(sl->dev))
                        {
                                /* if device busy no outfill */
-                               sl->tty->driver.write(sl->tty, 0, &s, 1);
+                               sl->tty->driver->write(sl->tty, 0, &s, 1);
                        }
                }
                else
index 69565d05d847c6e02e32167e34c4baaa7abd1fd1..e07301da8e97206a7fbbe9b411daa0fcc084dd9a 100644 (file)
@@ -318,7 +318,7 @@ static int cpc_tty_open(struct tty_struct *tty, struct file *flip)
                return -ENODEV;
        } 
 
-       port = minor(tty->device) - tty->driver.minor_start; 
+       port = minor(tty->device) - tty->driver->minor_start; 
 
        if ((port < 0) || (port >= CPC_TTY_NPORTS)){ 
                CPC_TTY_DBG("pc300_tty: open invalid minor %i\n",MINOR(tty->device));
index 897f4573a5107d6dc7141144f9be5110b2977b75..4983a7e2b7418a061039332b43be18f3f8dfeb66 100644 (file)
@@ -3698,7 +3698,7 @@ static int wanpipe_tty_open(struct tty_struct *tty, struct file * filp)
        
        if (!tty->driver_data){
                int port;
-               port = minor(tty->device) - tty->driver.minor_start;
+               port = minor(tty->device) - tty->driver->minor_start;
                if ((port < 0) || (port >= NR_PORTS)) 
                        return -ENODEV;
                
index 434c17cf6a64fdfe2d7a71c4ec8d7f754d896774..5d38b7b9a9145b3609af4b55800ad6b739a85680 100644 (file)
@@ -288,7 +288,7 @@ static void x25_asy_encaps(struct x25_asy *sl, unsigned char *icp, int len)
         *       14 Oct 1994  Dmitry Gorodchanin.
         */
        sl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
-       actual = sl->tty->driver.write(sl->tty, 0, sl->xbuff, count);
+       actual = sl->tty->driver->write(sl->tty, 0, sl->xbuff, count);
        sl->xleft = count - actual;
        sl->xhead = sl->xbuff + actual;
        /* VSV */
@@ -318,7 +318,7 @@ static void x25_asy_write_wakeup(struct tty_struct *tty)
                return;
        }
 
-       actual = tty->driver.write(tty, 0, sl->xhead, sl->xleft);
+       actual = tty->driver->write(tty, 0, sl->xhead, sl->xleft);
        sl->xleft -= actual;
        sl->xhead += actual;
 }
@@ -330,7 +330,7 @@ static void x25_asy_timeout(struct net_device *dev)
         *      14 Oct 1994 Dmitry Gorodchanin.
         */
        printk(KERN_WARNING "%s: transmit timed out, %s?\n", dev->name,
-              (sl->tty->driver.chars_in_buffer(sl->tty) || sl->xleft) ?
+              (sl->tty->driver->chars_in_buffer(sl->tty) || sl->xleft) ?
               "bad line quality" : "driver error");
        sl->xleft = 0;
        sl->tty->flags &= ~(1 << TTY_DO_WRITE_WAKEUP);
@@ -620,8 +620,8 @@ static int x25_asy_open_tty(struct tty_struct *tty)
 
        sl->tty = tty;
        tty->disc_data = sl;
-       if (tty->driver.flush_buffer)  {
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)  {
+               tty->driver->flush_buffer(tty);
        }
        if (tty->ldisc.flush_buffer)  {
                tty->ldisc.flush_buffer(tty);
index b2cf1ad6a513430ad4b56746e270006aba9639d5..aee42c4994d37db8ec56237b696dca7fe267db9b 100644 (file)
@@ -801,7 +801,7 @@ static void set_baud(struct tty_struct *tty, unsigned int baudcode)
        struct termios old_termios = *(tty->termios);
        tty->termios->c_cflag &= ~CBAUD;        /* Clear the old baud setting */
        tty->termios->c_cflag |= baudcode;      /* Set the new baud setting */
-       tty->driver.set_termios(tty, &old_termios);
+       tty->driver->set_termios(tty, &old_termios);
 }
 
 /*
@@ -1266,7 +1266,7 @@ static void ResetRadio(struct strip *strip_info)
                        set_baud(tty, strip_info->user_baud);
        }
 
-       tty->driver.write(tty, 0, s.string, s.length);
+       tty->driver->write(tty, 0, s.string, s.length);
 #ifdef EXT_COUNTERS
        strip_info->tx_ebytes += s.length;
 #endif
@@ -1288,7 +1288,7 @@ static void strip_write_some_more(struct tty_struct *tty)
 
        if (strip_info->tx_left > 0) {
                int num_written =
-                   tty->driver.write(tty, 0, strip_info->tx_head,
+                   tty->driver->write(tty, 0, strip_info->tx_head,
                                      strip_info->tx_left);
                strip_info->tx_left -= num_written;
                strip_info->tx_head += num_written;
@@ -2688,8 +2688,8 @@ static int strip_open(struct tty_struct *tty)
 
        strip_info->tty = tty;
        tty->disc_data = strip_info;
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
 
index 31a5102e84fcff54f3fc2da7d0eae46da1dbfd85..139f07da966ca1b1f286dbc2763037ee92ad5871 100644 (file)
@@ -957,7 +957,7 @@ tty3215_open(struct tty_struct *tty, struct file * filp)
        struct raw3215_info *raw;
        int retval, line;
 
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= NR_3215))
                return -ENODEV;
 
index 2861ae8de5091f52ea1df7294b99c67feef7e909..c55ee5796c9b7d8627cc2b8729eb90ec4866a6a8 100644 (file)
@@ -973,7 +973,7 @@ ctc_tty_open(struct tty_struct *tty, struct file *filp)
        int retval,
         line;
 
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if (line < 0 || line > CTC_TTY_MAX_DEVICES)
                return -ENODEV;
        info = &driver->info[line];
@@ -982,7 +982,7 @@ ctc_tty_open(struct tty_struct *tty, struct file *filp)
        if (!info->netdev)
                return -ENODEV;
 #ifdef CTC_DEBUG_MODEM_OPEN
-       printk(KERN_DEBUG "ctc_tty_open %s%d, count = %d\n", tty->driver.name,
+       printk(KERN_DEBUG "ctc_tty_open %s%d, count = %d\n", tty->driver->name,
               info->line, info->count);
 #endif
        spin_lock_irqsave(&ctc_tty_lock, saveflags);
@@ -1091,8 +1091,8 @@ ctc_tty_close(struct tty_struct *tty, struct file *filp)
                }
        }
        ctc_tty_shutdown(info);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        info->tty = 0;
index 7bc1f9cb66484a389a7b9ad03d0fc8b50665f233..f57a82d23cf836d829e956be16247aa56235b55c 100644 (file)
@@ -1564,8 +1564,8 @@ static void aurora_close(struct tty_struct * tty, struct file * filp)
        printk("aurora_close: shutdown_port\n");
 #endif
        aurora_shutdown_port(bp, port);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
index 38d65f5769347ec875bc73fc1c3c3653a6475dab..b7ad9f03a4ff4000767bc66fa545834378a48cde 100644 (file)
@@ -1198,8 +1198,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
        uart->ustcnt &= ~(USTCNT_RXEN | USTCNT_RX_INTR_MASK);
 
        shutdown(info);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
@@ -1277,7 +1277,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & S_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((info->flags & S_CALLOUT_ACTIVE) &&
@@ -1374,7 +1374,7 @@ int rs_open(struct tty_struct *tty, struct file * filp)
        struct m68k_serial      *info;
        int                     retval, line;
 
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        
        if (line >= NR_PORTS || line < 0) /* we have exactly one */
                return -ENODEV;
@@ -1401,7 +1401,7 @@ int rs_open(struct tty_struct *tty, struct file * filp)
        }
 
        if ((info->count == 1) && (info->flags & S_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->normal_termios;
                else 
                        *tty->termios = info->callout_termios;
index 27f1539c12b4b1488214624ad91f7fd32db2f5d2..a40c6553be475634278fd9f276b73cb2f1d9a61a 100644 (file)
@@ -1754,8 +1754,8 @@ static void rs_360_close(struct tty_struct *tty, struct file * filp)
                rs_360_wait_until_sent(tty, info->timeout);
        }
        shutdown(info);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
@@ -1905,7 +1905,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & ASYNC_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -2041,7 +2041,7 @@ static int rs_360_open(struct tty_struct *tty, struct file * filp)
        ser_info_t      *info;
        int             retval, line;
 
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= NR_PORTS))
                return -ENODEV;
        retval = get_async_struct(line, &info);
@@ -2051,7 +2051,7 @@ static int rs_360_open(struct tty_struct *tty, struct file * filp)
                return -ENODEV;
 
 #ifdef SERIAL_DEBUG_OPEN
-       printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
+       printk("rs_open %s%d, count = %d\n", tty->driver->name, info->line,
               info->state->count);
 #endif
        tty->driver_data = info;
@@ -2077,7 +2077,7 @@ static int rs_360_open(struct tty_struct *tty, struct file * filp)
 
        if ((info->state->count == 1) &&
            (info->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->state->normal_termios;
                else 
                        *tty->termios = info->state->callout_termios;
index 204a52e4edc87a124d023f28c4549ca2e8fff8f8..c242f8f6e8bd7e6a8fca4646cb554be2cdcf6c23 100644 (file)
@@ -578,7 +578,7 @@ static void uart_flush_buffer(struct tty_struct *tty)
        unsigned long flags;
 
        DPRINTK("uart_flush_buffer(%d) called\n",
-               minor(tty->device) - tty->driver.minor_start);
+               minor(tty->device) - tty->driver->minor_start);
 
        spin_lock_irqsave(&port->lock, flags);
        uart_circ_clear(&state->info->xmit);
@@ -839,7 +839,7 @@ uart_set_info(struct uart_state *state, struct serial_struct *newinfo)
                         * need to rate-limit; it's CAP_SYS_ADMIN only. */
                        if (port->flags & UPF_SPD_MASK) {
                                printk(KERN_NOTICE "%s sets custom speed on %s%d. This is deprecated.\n",
-                                      current->comm, state->info->tty->driver.name, 
+                                      current->comm, state->info->tty->driver->name, 
                                       state->port->line);
                        }
                        uart_change_speed(state, NULL);
@@ -1234,7 +1234,7 @@ static void uart_close(struct tty_struct *tty, struct file *filp)
        }
        if (--state->count < 0) {
                printk("rs_close: bad serial port count for %s%d: %d\n",
-                      tty->driver.name, port->line, state->count);
+                      tty->driver->name, port->line, state->count);
                state->count = 0;
        }
        if (state->count)
@@ -1554,20 +1554,20 @@ static struct uart_state *uart_get(struct uart_driver *drv, int line)
  */
 static int uart_open(struct tty_struct *tty, struct file *filp)
 {
-       struct uart_driver *drv = (struct uart_driver *)tty->driver.driver_state;
+       struct uart_driver *drv = (struct uart_driver *)tty->driver->driver_state;
        struct uart_state *state;
-       int retval, line = minor(tty->device) - tty->driver.minor_start;
+       int retval, line = minor(tty->device) - tty->driver->minor_start;
 
        BUG_ON(!kernel_locked());
        DPRINTK("uart_open(%d) called\n", line);
 
        /*
-        * tty->driver.num won't change, so we won't fail here with
+        * tty->driver->num won't change, so we won't fail here with
         * tty->driver_data set to something non-NULL (and therefore
         * we won't get caught by uart_close()).
         */
        retval = -ENODEV;
-       if (line >= tty->driver.num)
+       if (line >= tty->driver->num)
                goto fail;
 
        /*
index 5ec60685b87c25b178772d13e0eb3aeacb267300..b89dfd95d1fabf8999441ddb9f130afac26b8275 100644 (file)
@@ -1229,8 +1229,8 @@ static void mcfrs_close(struct tty_struct *tty, struct file * filp)
        } else
 #endif
        shutdown(info);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
@@ -1308,7 +1308,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & ASYNC_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((info->flags & ASYNC_CALLOUT_ACTIVE) &&
@@ -1416,14 +1416,14 @@ int mcfrs_open(struct tty_struct *tty, struct file * filp)
        struct mcf_serial       *info;
        int                     retval, line;
 
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= NR_PORTS))
                return -ENODEV;
        info = mcfrs_table + line;
        if (serial_paranoia_check(info, tty->device, "mcfrs_open"))
                return -ENODEV;
 #ifdef SERIAL_DEBUG_OPEN
-       printk("mcfrs_open %s%d, count = %d\n", tty->driver.name, info->line,
+       printk("mcfrs_open %s%d, count = %d\n", tty->driver->name, info->line,
               info->count);
 #endif
        info->count++;
@@ -1447,7 +1447,7 @@ int mcfrs_open(struct tty_struct *tty, struct file * filp)
        }
 
        if ((info->count == 1) && (info->flags & ASYNC_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->normal_termios;
                else 
                        *tty->termios = info->callout_termios;
index 9fed6cfbd9afd165182c9a0f382bfe0cbd85e767..54b8c88a1ab79f4311d868025a4e69008b8112d4 100644 (file)
@@ -1539,8 +1539,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
        ZS_CLEARFIFO(info->zs_channel);
 
        shutdown(info);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
@@ -1618,7 +1618,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & ZILOG_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((info->flags & ZILOG_CALLOUT_ACTIVE) &&
@@ -1725,7 +1725,7 @@ int rs_open(struct tty_struct *tty, struct file * filp)
        struct sgi_serial       *info;
        int                     retval, line;
 
-       line = MINOR(tty->device) - tty->driver.minor_start;
+       line = MINOR(tty->device) - tty->driver->minor_start;
        /* The zilog lines for the mouse/keyboard must be
         * opened using their respective drivers.
         */
@@ -1738,7 +1738,7 @@ int rs_open(struct tty_struct *tty, struct file * filp)
        if (serial_paranoia_check(info, tty->device, "rs_open"))
                return -ENODEV;
 #ifdef SERIAL_DEBUG_OPEN
-       printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
+       printk("rs_open %s%d, count = %d\n", tty->driver->name, info->line,
               info->count);
 #endif
        info->count++;
@@ -1762,7 +1762,7 @@ int rs_open(struct tty_struct *tty, struct file * filp)
        }
 
        if ((info->count == 1) && (info->flags & ZILOG_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->normal_termios;
                else 
                        *tty->termios = info->callout_termios;
index 6ffa6a963d3adb508946bbea05c3143fbc3b3bd0..a24d5c4eea4c54832a7773860f804fb3a91767be 100644 (file)
@@ -1424,8 +1424,8 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
        }
 
        shutdown(info);
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);
        tty->closing = 0;
@@ -1527,7 +1527,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
         * If this is a callout device, then just make sure the normal
         * device isn't being used.
         */
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                if (info->flags & ZILOG_NORMAL_ACTIVE)
                        return -EBUSY;
                if ((info->flags & ZILOG_CALLOUT_ACTIVE) &&
@@ -1639,7 +1639,7 @@ int rs_open(struct tty_struct *tty, struct file * filp)
        struct dec_serial       *info;
        int                     retval, line;
 
-       line = MINOR(tty->device) - tty->driver.minor_start;
+       line = MINOR(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= zs_channels_found))
                return -ENODEV;
        info = zs_soft + line;
@@ -1650,7 +1650,7 @@ int rs_open(struct tty_struct *tty, struct file * filp)
        if (serial_paranoia_check(info, tty->device, "rs_open"))
                return -ENODEV;
 #ifdef SERIAL_DEBUG_OPEN
-       printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line,
+       printk("rs_open %s%d, count = %d\n", tty->driver->name, info->line,
               info->count);
 #endif
 
@@ -1690,7 +1690,7 @@ int rs_open(struct tty_struct *tty, struct file * filp)
        }
 
        if ((info->count == 1) && (info->flags & ZILOG_SPLIT_TERMIOS)) {
-               if (tty->driver.subtype == SERIAL_TYPE_NORMAL)
+               if (tty->driver->subtype == SERIAL_TYPE_NORMAL)
                        *tty->termios = info->normal_termios;
                else 
                        *tty->termios = info->callout_termios;
index 8d5db2732654da1bcc3306b8ee9d3c885f0fe223..97a2c2eaf2f0f24109131c6cb27ae28d6e9fb82f 100644 (file)
@@ -1565,8 +1565,8 @@ dbg( "digi_close: TOP: port=%d, open_count=%d", priv->dp_port_num, port->open_co
        }
 
        /* flush driver and line discipline buffers */
-       if( tty->driver.flush_buffer )
-               tty->driver.flush_buffer( tty );
+       if( tty->driver->flush_buffer )
+               tty->driver->flush_buffer( tty );
        if( tty->ldisc.flush_buffer )
                tty->ldisc.flush_buffer( tty );
 
index 7acdf0580a3f92af4bc254716718d17ff59e01cf..d71084d0b0501b93fcfd1e82d1295fc23350a46f 100644 (file)
@@ -646,8 +646,8 @@ static void whiteheat_close(struct usb_serial_port *port, struct file * filp)
        }
 */
 
-       if (port->tty->driver.flush_buffer)
-               port->tty->driver.flush_buffer(port->tty);
+       if (port->tty->driver->flush_buffer)
+               port->tty->driver->flush_buffer(port->tty);
        if (port->tty->ldisc.flush_buffer)
                port->tty->ldisc.flush_buffer(port->tty);
 
index 9c16b6c58bd0b5f30863cf7b91170fb04c98e395..1ee727bd536cb897ac4f3da765d9a8e58306ed6f 100644 (file)
@@ -259,7 +259,7 @@ struct tty_flip_buffer {
  */
 struct tty_struct {
        int     magic;
-       struct tty_driver driver;
+       struct tty_driver *driver;
        struct tty_ldisc ldisc;
        struct termios *termios, *termios_locked;
        int pgrp;
index 4872b44905610c4c9583ebcdda81613aa35e0ddd..a7a9811929b957f4b5c0d0a5a3ab3a58a2d94145 100644 (file)
@@ -674,7 +674,7 @@ EXPORT_SYMBOL(unregister_console);
  */
 void tty_write_message(struct tty_struct *tty, char *msg)
 {
-       if (tty && tty->driver.write)
-               tty->driver.write(tty, 0, msg, strlen(msg));
+       if (tty && tty->driver->write)
+               tty->driver->write(tty, 0, msg, strlen(msg));
        return;
 }
index bb1db209e5ea17ef356b2cc67345d162e2a0c39c..71d8cd352196221343ca4583b14645bdc40b3576 100644 (file)
@@ -532,7 +532,7 @@ static int rfcomm_tty_open(struct tty_struct *tty, struct file *filp)
        struct rfcomm_dlc *dlc;
        int err, id;
 
-        id = minor(tty->device) - tty->driver.minor_start;
+        id = minor(tty->device) - tty->driver->minor_start;
 
        BT_DBG("tty %p id %d", tty, id);
 
index 8729898f7a7679ee64941b63c5cf6c193f3b65a8..414bbe9b76cdbae178813b01e2602da10ccffab2 100644 (file)
@@ -48,8 +48,8 @@ static void print_string(char *str)
        /* The tty for the current task */
        my_tty = current->tty;
        if (my_tty != NULL) {
-               (*(my_tty->driver).write)(my_tty, 0, str, strlen(str));
-               (*(my_tty->driver).write)(my_tty, 0, "\015\012", 2);
+               my_tty->driver->write(my_tty, 0, str, strlen(str));
+               my_tty->driver->write(my_tty, 0, "\015\012", 2);
        }
 }
 
index 20e0669591aec95473f996fb6c5aa6c12a301baf..17addb35043f2b05574d25f521ee43372a32c06f 100644 (file)
@@ -251,7 +251,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
 
        tty = self->tty;
 
-       if (tty->driver.subtype == SERIAL_TYPE_CALLOUT) {
+       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
                /* this is a callout device */
                /* just verify that normal device is not in use */
                if (self->flags & ASYNC_NORMAL_ACTIVE)
@@ -306,7 +306,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
        add_wait_queue(&self->open_wait, &wait);
        
        IRDA_DEBUG(2, "%s(%d):block_til_ready before block on %s open_count=%d\n",
-             __FILE__,__LINE__, tty->driver.name, self->open_count );
+             __FILE__,__LINE__, tty->driver->name, self->open_count );
 
        /* As far as I can see, we protect open_count - Jean II */
        spin_lock_irqsave(&self->spinlock, flags);
@@ -356,7 +356,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
                }
                
                IRDA_DEBUG(1, "%s(%d):block_til_ready blocking on %s open_count=%d\n",
-                     __FILE__,__LINE__, tty->driver.name, self->open_count );
+                     __FILE__,__LINE__, tty->driver->name, self->open_count );
                
                schedule();
        }
@@ -373,7 +373,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
        self->blocked_open--;
        
        IRDA_DEBUG(1, "%s(%d):block_til_ready after blocking on %s open_count=%d\n",
-             __FILE__,__LINE__, tty->driver.name, self->open_count);
+             __FILE__,__LINE__, tty->driver->name, self->open_count);
                         
        if (!retval)
                self->flags |= ASYNC_NORMAL_ACTIVE;
@@ -398,7 +398,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
        IRDA_DEBUG(2, "%s()\n", __FUNCTION__ );
 
        MOD_INC_USE_COUNT;
-       line = minor(tty->device) - tty->driver.minor_start;
+       line = minor(tty->device) - tty->driver->minor_start;
        if ((line < 0) || (line >= IRCOMM_TTY_PORTS)) {
                MOD_DEC_USE_COUNT;
                return -ENODEV;
@@ -451,7 +451,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
        self->tty = tty;
        spin_unlock_irqrestore(&self->spinlock, flags);
 
-       IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __FUNCTION__ , tty->driver.name, 
+       IRDA_DEBUG(1, "%s(), %s%d, count = %d\n", __FUNCTION__ , tty->driver->name, 
                   self->line, self->open_count);
 
        /* Not really used by us, but lets do it anyway */
@@ -592,8 +592,8 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
 
        ircomm_tty_shutdown(self);
 
-       if (tty->driver.flush_buffer)
-               tty->driver.flush_buffer(tty);
+       if (tty->driver->flush_buffer)
+               tty->driver->flush_buffer(tty);
        if (tty->ldisc.flush_buffer)
                tty->ldisc.flush_buffer(tty);