]> Pileus Git - ~andy/linux/commitdiff
serial: move delta_msr_wait into the tty_port
authorAlan Cox <alan@linux.intel.com>
Sat, 19 Sep 2009 20:13:31 +0000 (13:13 -0700)
committerLive-CD User <linux@linux.site>
Sat, 19 Sep 2009 20:13:31 +0000 (13:13 -0700)
This is used by various drivers not just serial and can be extracted
as commonality

Signed-off-by: Alan Cox <alan@linux.intel.com>
32 files changed:
drivers/char/cyclades.c
drivers/char/esp.c
drivers/char/mxser.c
drivers/char/tty_port.c
drivers/serial/8250.c
drivers/serial/amba-pl010.c
drivers/serial/amba-pl011.c
drivers/serial/atmel_serial.c
drivers/serial/icom.c
drivers/serial/imx.c
drivers/serial/ioc3_serial.c
drivers/serial/ioc4_serial.c
drivers/serial/ip22zilog.c
drivers/serial/msm_serial.c
drivers/serial/pmac_zilog.c
drivers/serial/pnx8xxx_uart.c
drivers/serial/pxa.c
drivers/serial/sa1100.c
drivers/serial/sb1250-duart.c
drivers/serial/serial_core.c
drivers/serial/serial_ks8695.c
drivers/serial/serial_lh7a40x.c
drivers/serial/sunsab.c
drivers/serial/sunsu.c
drivers/serial/sunzilog.c
drivers/serial/timbuart.c
drivers/serial/vr41xx_siu.c
drivers/serial/zs.c
include/linux/cyclades.h
include/linux/hayesesp.h
include/linux/serial_core.h
include/linux/tty.h

index 70bd61b2a7d7656401a5af2e2407361e8a6f6845..df5038bbcbc28647cc64eed72f0fee6fbc8c2568 100644 (file)
@@ -729,7 +729,7 @@ static void cyy_chip_modem(struct cyclades_card *cinfo, int chip,
                if (mdm_change & CyRI)
                        info->icount.rng++;
 
-               wake_up_interruptible(&info->delta_msr_wait);
+               wake_up_interruptible(&info->port.delta_msr_wait);
        }
 
        if ((mdm_change & CyDCD) && (info->port.flags & ASYNC_CHECK_CD)) {
@@ -1197,7 +1197,7 @@ static void cyz_handle_cmd(struct cyclades_card *cinfo)
                        break;
                }
                if (delta_count)
-                       wake_up_interruptible(&info->delta_msr_wait);
+                       wake_up_interruptible(&info->port.delta_msr_wait);
                if (special_count)
                        tty_schedule_flip(tty);
                tty_kref_put(tty);
@@ -1464,7 +1464,7 @@ static void cy_shutdown(struct cyclades_port *info, struct tty_struct *tty)
                spin_lock_irqsave(&card->card_lock, flags);
 
                /* Clear delta_msr_wait queue to avoid mem leaks. */
-               wake_up_interruptible(&info->delta_msr_wait);
+               wake_up_interruptible(&info->port.delta_msr_wait);
 
                if (info->port.xmit_buf) {
                        unsigned char *temp;
@@ -2788,7 +2788,7 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
                /* note the counters on entry */
                cnow = info->icount;
                spin_unlock_irqrestore(&info->card->card_lock, flags);
-               ret_val = wait_event_interruptible(info->delta_msr_wait,
+               ret_val = wait_event_interruptible(info->port.delta_msr_wait,
                                cy_cflags_changed(info, arg, &cnow));
                break;
 
@@ -3153,7 +3153,6 @@ static int __devinit cy_init_card(struct cyclades_card *cinfo)
                info->port.close_delay = 5 * HZ / 10;
                info->port.flags = STD_COM_FLAGS;
                init_completion(&info->shutdown_wait);
-               init_waitqueue_head(&info->delta_msr_wait);
 
                if (cy_is_Z(cinfo)) {
                        struct FIRM_ID *firm_id = cinfo->base_addr + ID_ADDRESS;
index a5c59fc2b0ff44335bf61d94ba33b039e6103ac5..b19d43cd9542d772513c4c4b70b83f2a14cdf8e7 100644 (file)
@@ -572,7 +572,7 @@ static void check_modem_status(struct esp_struct *info)
                        info->icount.dcd++;
                if (status & UART_MSR_DCTS)
                        info->icount.cts++;
-               wake_up_interruptible(&info->delta_msr_wait);
+               wake_up_interruptible(&info->port.delta_msr_wait);
        }
 
        if ((info->port.flags & ASYNC_CHECK_CD) && (status & UART_MSR_DDCD)) {
@@ -927,7 +927,7 @@ static void shutdown(struct esp_struct *info)
         * clear delta_msr_wait queue to avoid mem leaks: we may free the irq
         * here so the queue might never be waken up
         */
-       wake_up_interruptible(&info->delta_msr_wait);
+       wake_up_interruptible(&info->port.delta_msr_wait);
        wake_up_interruptible(&info->break_wait);
 
        /* stop a DMA transfer on the port being closed */
@@ -1800,7 +1800,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file *file,
                spin_unlock_irqrestore(&info->lock, flags);
                while (1) {
                        /* FIXME: convert to new style wakeup */
-                       interruptible_sleep_on(&info->delta_msr_wait);
+                       interruptible_sleep_on(&info->port.delta_msr_wait);
                        /* see if a signal did it */
                        if (signal_pending(current))
                                return -ERESTARTSYS;
@@ -2452,7 +2452,6 @@ static int __init espserial_init(void)
                info->config.flow_off = flow_off;
                info->config.pio_threshold = pio_threshold;
                info->next_port = ports;
-               init_waitqueue_head(&info->delta_msr_wait);
                init_waitqueue_head(&info->break_wait);
                ports = info;
                printk(KERN_INFO "ttyP%d at 0x%04x (irq = %d) is an ESP ",
index 30544ca5e956ae7424bb46471af88f04a866be91..37058ff7da7d72e2597fe053563e46e31a49a31d 100644 (file)
@@ -258,7 +258,6 @@ struct mxser_port {
        struct mxser_mon mon_data;
 
        spinlock_t slock;
-       wait_queue_head_t delta_msr_wait;
 };
 
 struct mxser_board {
@@ -818,7 +817,7 @@ static void mxser_check_modem_status(struct tty_struct *tty,
        if (status & UART_MSR_DCTS)
                port->icount.cts++;
        port->mon_data.modem_status = status;
-       wake_up_interruptible(&port->delta_msr_wait);
+       wake_up_interruptible(&port->port.delta_msr_wait);
 
        if ((port->port.flags & ASYNC_CHECK_CD) && (status & UART_MSR_DDCD)) {
                if (status & UART_MSR_DCD)
@@ -973,7 +972,7 @@ static void mxser_shutdown(struct tty_struct *tty)
         * clear delta_msr_wait queue to avoid mem leaks: we may free the irq
         * here so the queue might never be waken up
         */
-       wake_up_interruptible(&info->delta_msr_wait);
+       wake_up_interruptible(&info->port.delta_msr_wait);
 
        /*
         * Free the IRQ, if necessary
@@ -1762,7 +1761,7 @@ static int mxser_ioctl(struct tty_struct *tty, struct file *file,
                cnow = info->icount;    /* note the counters on entry */
                spin_unlock_irqrestore(&info->slock, flags);
 
-               return wait_event_interruptible(info->delta_msr_wait,
+               return wait_event_interruptible(info->port.delta_msr_wait,
                                mxser_cflags_changed(info, arg, &cnow));
        /*
         * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
@@ -2414,7 +2413,6 @@ static int __devinit mxser_initbrd(struct mxser_board *brd,
                info->port.close_delay = 5 * HZ / 10;
                info->port.closing_wait = 30 * HZ;
                info->normal_termios = mxvar_sdriver->init_termios;
-               init_waitqueue_head(&info->delta_msr_wait);
                memset(&info->mon_data, 0, sizeof(struct mxser_mon));
                info->err_shadow = 0;
                spin_lock_init(&info->slock);
index 549bd0fa8bb6b4972279b5152243da227a7c744f..c767e30a1425ac20965a8cd74323ca2d1a6a47dd 100644 (file)
@@ -23,6 +23,7 @@ void tty_port_init(struct tty_port *port)
        memset(port, 0, sizeof(*port));
        init_waitqueue_head(&port->open_wait);
        init_waitqueue_head(&port->close_wait);
+       init_waitqueue_head(&port->delta_msr_wait);
        mutex_init(&port->mutex);
        spin_lock_init(&port->lock);
        port->close_delay = (50 * HZ) / 100;
@@ -124,6 +125,7 @@ void tty_port_hangup(struct tty_port *port)
        port->tty = NULL;
        spin_unlock_irqrestore(&port->lock, flags);
        wake_up_interruptible(&port->open_wait);
+       wake_up_interruptible(&port->delta_msr_wait);
        tty_port_shutdown(port);
 }
 EXPORT_SYMBOL(tty_port_hangup);
index e415c5eca59910822c46728f2866d9f8351b45dc..2209620d2349337a44b6a9b035c8cd6583f96b79 100644 (file)
@@ -1510,7 +1510,7 @@ static unsigned int check_modem_status(struct uart_8250_port *up)
                if (status & UART_MSR_DCTS)
                        uart_handle_cts_change(&up->port, status & UART_MSR_CTS);
 
-               wake_up_interruptible(&up->port.state->delta_msr_wait);
+               wake_up_interruptible(&up->port.state->port.delta_msr_wait);
        }
 
        return status;
index 39032413d4a1cafcbd672726f5da0166df566a46..429a8ae86933c1067ba1c1a6a748f9dcf737961a 100644 (file)
@@ -225,7 +225,7 @@ static void pl010_modem_status(struct uart_amba_port *uap)
        if (delta & UART01x_FR_CTS)
                uart_handle_cts_change(&uap->port, status & UART01x_FR_CTS);
 
-       wake_up_interruptible(&uap->port.state->delta_msr_wait);
+       wake_up_interruptible(&uap->port.state->port.delta_msr_wait);
 }
 
 static irqreturn_t pl010_int(int irq, void *dev_id)
index ef82a34baf0ff667c1b9ab3ba6fa83329ac68703..ef7adc8135dd4755fbd3cbde2c560988ea2afc0f 100644 (file)
@@ -226,7 +226,7 @@ static void pl011_modem_status(struct uart_amba_port *uap)
        if (delta & UART01x_FR_CTS)
                uart_handle_cts_change(&uap->port, status & UART01x_FR_CTS);
 
-       wake_up_interruptible(&uap->port.state->delta_msr_wait);
+       wake_up_interruptible(&uap->port.state->port.delta_msr_wait);
 }
 
 static irqreturn_t pl011_int(int irq, void *dev_id)
index 963e3c12af41c620df6051eccf6b16fc58e0afe5..3551c5cb70940cb9c4733ce645ce81ba1d9f2e3f 100644 (file)
@@ -776,7 +776,7 @@ static void atmel_tasklet_func(unsigned long data)
                if (status_change & ATMEL_US_CTS)
                        uart_handle_cts_change(port, !(status & ATMEL_US_CTS));
 
-               wake_up_interruptible(&port->state->delta_msr_wait);
+               wake_up_interruptible(&port->state->port.delta_msr_wait);
 
                atmel_port->irq_status_prev = status;
        }
index f86c47e08a0673e24ea5d42ce19c884c0cc3d532..2d7feecaf492368294e92b884dc3fbd349f6a648 100644 (file)
@@ -695,7 +695,7 @@ static inline void check_modem_status(struct icom_port *icom_port)
                                               delta_status & ICOM_CTS);
 
                wake_up_interruptible(&icom_port->uart_port.state->
-                                     delta_msr_wait);
+                                     port.delta_msr_wait);
                old_status = status;
        }
        spin_unlock(&icom_port->uart_port.lock);
index 1febeafcb97a7ab196c4c276e2bf939d562df293..18130f11238e6025b16682c9a00cca218727e370 100644 (file)
@@ -224,7 +224,7 @@ static void imx_mctrl_check(struct imx_port *sport)
        if (changed & TIOCM_CTS)
                uart_handle_cts_change(&sport->port, status & TIOCM_CTS);
 
-       wake_up_interruptible(&sport->port.state->delta_msr_wait);
+       wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
 }
 
 /*
@@ -388,7 +388,7 @@ static irqreturn_t imx_rtsint(int irq, void *dev_id)
 
        writel(USR1_RTSD, sport->port.membase + USR1);
        uart_handle_cts_change(&sport->port, !!val);
-       wake_up_interruptible(&sport->port.state->delta_msr_wait);
+       wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
 
        spin_unlock_irqrestore(&sport->port.lock, flags);
        return IRQ_HANDLED;
index de4ab1bfee8d9216c67810a604732c9864421ca7..d8983dd5c4b22e82e0355f8af1bb53671e561d31 100644 (file)
@@ -1287,7 +1287,7 @@ static inline int do_read(struct uart_port *the_port, char *buf, int len)
                                                        (port->ip_port, 0);
                                                wake_up_interruptible
                                                    (&the_port->state->
-                                                    delta_msr_wait);
+                                                    port.delta_msr_wait);
                                        }
 
                                        /* If we had any data to return, we
@@ -1491,7 +1491,7 @@ ioc3uart_intr_one(struct ioc3_submodule *is,
                                uart_handle_dcd_change(the_port,
                                                shadow & SHADOW_DCD);
                                wake_up_interruptible
-                                   (&the_port->state->delta_msr_wait);
+                                   (&the_port->state->port.delta_msr_wait);
                        } else if ((port->ip_notify & N_DDCD)
                                   && !(shadow & SHADOW_DCD)) {
                                /* Flag delta DCD/no DCD */
@@ -1511,7 +1511,7 @@ ioc3uart_intr_one(struct ioc3_submodule *is,
                                uart_handle_cts_change(the_port, shadow
                                                & SHADOW_CTS);
                                wake_up_interruptible
-                                   (&the_port->state->delta_msr_wait);
+                                   (&the_port->state->port.delta_msr_wait);
                        }
                }
 
@@ -1728,7 +1728,7 @@ static void ic3_shutdown(struct uart_port *the_port)
                return;
 
        state = the_port->state;
-       wake_up_interruptible(&state->delta_msr_wait);
+       wake_up_interruptible(&state->port.delta_msr_wait);
 
        spin_lock_irqsave(&the_port->lock, port_flags);
        set_notification(port, N_ALL, 0);
index 2055d323f15fcda022f186fea67b6c27d12bba31..2e02c3026d24f464ebca356d548ffed7e2e9b189 100644 (file)
@@ -1882,7 +1882,7 @@ static void handle_intr(void *arg, uint32_t sio_ir)
                                the_port = port->ip_port;
                                the_port->icount.dcd = 1;
                                wake_up_interruptible
-                                           (&the_port->state->delta_msr_wait);
+                                           (&the_port->state->port.delta_msr_wait);
                        } else if ((port->ip_notify & N_DDCD)
                                        && !(shadow & IOC4_SHADOW_DCD)) {
                                /* Flag delta DCD/no DCD */
@@ -1904,7 +1904,7 @@ static void handle_intr(void *arg, uint32_t sio_ir)
                                the_port->icount.cts =
                                        (shadow & IOC4_SHADOW_CTS) ? 1 : 0;
                                wake_up_interruptible
-                                       (&the_port->state->delta_msr_wait);
+                                       (&the_port->state->port.delta_msr_wait);
                        }
                }
 
@@ -2237,7 +2237,7 @@ static inline int do_read(struct uart_port *the_port, unsigned char *buf,
                                                the_port->icount.dcd = 0;
                                                wake_up_interruptible
                                                    (&the_port->state->
-                                                       delta_msr_wait);
+                                                       port.delta_msr_wait);
                                        }
 
                                        /* If we had any data to return, we
@@ -2439,7 +2439,7 @@ static void ic4_shutdown(struct uart_port *the_port)
        state = the_port->state;
        port->ip_port = NULL;
 
-       wake_up_interruptible(&state->delta_msr_wait);
+       wake_up_interruptible(&state->port.delta_msr_wait);
 
        if (state->port.tty)
                set_bit(TTY_IO_ERROR, &state->port.tty->flags);
index 2e847deb41dcfd2107cbc9abf3086ba5e02c0984..ebff4a1d4bcc04626f519ebd824f94af5f25a506 100644 (file)
@@ -354,7 +354,7 @@ static void ip22zilog_status_handle(struct uart_ip22zilog_port *up,
                        uart_handle_cts_change(&up->port,
                                               (status & CTS));
 
-               wake_up_interruptible(&up->port.state->delta_msr_wait);
+               wake_up_interruptible(&up->port.state->port.delta_msr_wait);
        }
 
        up->prev_status = status;
index ff18d50c99c1cb2489c26b4ee0a807072b789927..b05c5aa02cb47ba6a3ee60d305e34f14f5c51859 100644 (file)
@@ -169,7 +169,7 @@ static void handle_delta_cts(struct uart_port *port)
 {
        msm_write(port, UART_CR_CMD_RESET_CTS, UART_CR);
        port->icount.cts++;
-       wake_up_interruptible(&port->state->delta_msr_wait);
+       wake_up_interruptible(&port->state->port.delta_msr_wait);
 }
 
 static irqreturn_t msm_irq(int irq, void *dev_id)
index 0dc786835dca740cd370d075f36e18ddffa67b3e..0700cd10b97ccbbd49f889b5ab3af26435e3003f 100644 (file)
@@ -369,7 +369,7 @@ static void pmz_status_handle(struct uart_pmac_port *uap)
                        uart_handle_cts_change(&uap->port,
                                               !(status & CTS));
 
-               wake_up_interruptible(&uap->port.state->delta_msr_wait);
+               wake_up_interruptible(&uap->port.state->port.delta_msr_wait);
        }
 
        if (status & BRK_ABRT)
index 2da747635275a2e11b1545c3bea832fcfcbfea3a..0aa75a97531c77622e2aff05988e3a04fe242d69 100644 (file)
@@ -100,7 +100,7 @@ static void pnx8xxx_mctrl_check(struct pnx8xxx_port *sport)
        if (changed & TIOCM_CTS)
                uart_handle_cts_change(&sport->port, status & TIOCM_CTS);
 
-       wake_up_interruptible(&sport->port.state->delta_msr_wait);
+       wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
 }
 
 /*
index ad48919c041575f73531c5f87f5064a8e16eb391..6443b7ff274ae109edec4bfa61c3eb9479149d39 100644 (file)
@@ -220,7 +220,7 @@ static inline void check_modem_status(struct uart_pxa_port *up)
        if (status & UART_MSR_DCTS)
                uart_handle_cts_change(&up->port, status & UART_MSR_CTS);
 
-       wake_up_interruptible(&up->port.state->delta_msr_wait);
+       wake_up_interruptible(&up->port.state->port.delta_msr_wait);
 }
 
 /*
index 61ef3ae24927505f9a5c3b8294487044092522cb..7f5e26873220b6f4b17fb5b6d34de3fbedd72d2a 100644 (file)
@@ -117,7 +117,7 @@ static void sa1100_mctrl_check(struct sa1100_port *sport)
        if (changed & TIOCM_CTS)
                uart_handle_cts_change(&sport->port, status & TIOCM_CTS);
 
-       wake_up_interruptible(&sport->port.state->delta_msr_wait);
+       wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
 }
 
 /*
index fa5f303b36d378f546351d84e2e2bd53ef3796b4..a2f2b3254499db91428d80934d1811690872e94e 100644 (file)
@@ -440,7 +440,7 @@ static void sbd_status_handle(struct sbd_port *sport)
 
        if (delta & ((M_DUART_IN_PIN2_VAL | M_DUART_IN_PIN0_VAL) <<
                     S_DUART_IN_PIN_CHNG))
-               wake_up_interruptible(&uport->state->delta_msr_wait);
+               wake_up_interruptible(&uport->state->port.delta_msr_wait);
 }
 
 static irqreturn_t sbd_interrupt(int irq, void *dev_id)
index 9d42e57e197135b5b2978acb921c2d418daaa67c..e16d15343dfdf629d91d816245bbfa2ed85845bf 100644 (file)
@@ -215,7 +215,8 @@ static int uart_startup(struct uart_state *state, int init_hw)
 static void uart_shutdown(struct uart_state *state)
 {
        struct uart_port *uport = state->uart_port;
-       struct tty_struct *tty = state->port.tty;
+       struct tty_port *port = &state->port;
+       struct tty_struct *tty = port->tty;
 
        /*
         * Set the TTY IO error marker
@@ -223,7 +224,7 @@ static void uart_shutdown(struct uart_state *state)
        if (tty)
                set_bit(TTY_IO_ERROR, &tty->flags);
 
-       if (test_and_clear_bit(ASYNCB_INITIALIZED, &state->port.flags)) {
+       if (test_and_clear_bit(ASYNCB_INITIALIZED, &port->flags)) {
                /*
                 * Turn off DTR and RTS early.
                 */
@@ -237,7 +238,7 @@ static void uart_shutdown(struct uart_state *state)
                 * any outstanding file descriptors should be pointing at
                 * hung_up_tty_fops now.
                 */
-               wake_up_interruptible(&state->delta_msr_wait);
+               wake_up_interruptible(&port->delta_msr_wait);
 
                /*
                 * Free the IRQ and disable the port.
@@ -1004,11 +1005,15 @@ static int uart_do_autoconfig(struct uart_state *state)
  * - mask passed in arg for lines of interest
  *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
  * Caller should use TIOCGICOUNT to see which one it was
+ *
+ * FIXME: This wants extracting into a common all driver implementation
+ * of TIOCMWAIT using tty_port.
  */
 static int
 uart_wait_modem_status(struct uart_state *state, unsigned long arg)
 {
        struct uart_port *uport = state->uart_port;
+       struct tty_port *port = &state->port;
        DECLARE_WAITQUEUE(wait, current);
        struct uart_icount cprev, cnow;
        int ret;
@@ -1025,7 +1030,7 @@ uart_wait_modem_status(struct uart_state *state, unsigned long arg)
        uport->ops->enable_ms(uport);
        spin_unlock_irq(&uport->lock);
 
-       add_wait_queue(&state->delta_msr_wait, &wait);
+       add_wait_queue(&port->delta_msr_wait, &wait);
        for (;;) {
                spin_lock_irq(&uport->lock);
                memcpy(&cnow, &uport->icount, sizeof(struct uart_icount));
@@ -1053,7 +1058,7 @@ uart_wait_modem_status(struct uart_state *state, unsigned long arg)
        }
 
        current->state = TASK_RUNNING;
-       remove_wait_queue(&state->delta_msr_wait, &wait);
+       remove_wait_queue(&port->delta_msr_wait, &wait);
 
        return ret;
 }
@@ -1430,7 +1435,7 @@ static void uart_hangup(struct tty_struct *tty)
                clear_bit(ASYNCB_NORMAL_ACTIVE, &port->flags);
                port->tty = NULL;
                wake_up_interruptible(&port->open_wait);
-               wake_up_interruptible(&state->delta_msr_wait);
+               wake_up_interruptible(&port->delta_msr_wait);
        }
        mutex_unlock(&port->mutex);
 }
@@ -2378,7 +2383,6 @@ int uart_register_driver(struct uart_driver *drv)
                tty_port_init(port);
                port->close_delay     = 500;    /* .5 seconds */
                port->closing_wait    = 30000;  /* 30 seconds */
-               init_waitqueue_head(&state->delta_msr_wait);
                tasklet_init(&state->tlet, uart_tasklet_action,
                             (unsigned long)state);
        }
index 4560b2e706850affce557035f82754aea5d467f3..2e71bbc04dac4d49054ca682f8b6976ce82dba86 100644 (file)
@@ -266,7 +266,7 @@ static irqreturn_t ks8695uart_modem_status(int irq, void *dev_id)
        if (status & URMS_URTERI)
                port->icount.rng++;
 
-       wake_up_interruptible(&port->state->delta_msr_wait);
+       wake_up_interruptible(&port->state->port.delta_msr_wait);
 
        return IRQ_HANDLED;
 }
index 057fc5e8cc8df3769d21d379f3ac6c5ca579ee52..ea744707c4d6a243f0aa0c195a5422ec966420d1 100644 (file)
@@ -241,7 +241,7 @@ static void lh7a40xuart_modem_status (struct uart_port* port)
        if (delta & CTS)
                uart_handle_cts_change (port, status & CTS);
 
-       wake_up_interruptible (&port->state->delta_msr_wait);
+       wake_up_interruptible (&port->state->port.delta_msr_wait);
 }
 
 static irqreturn_t lh7a40xuart_int (int irq, void* dev_id)
index 7c4f2fe8e24657691ddd75eada2ffc44cfd844c2..d1ad34128635d215c83348bd57ee72bf88894f96 100644 (file)
@@ -297,7 +297,7 @@ static void check_status(struct uart_sunsab_port *up,
                up->port.icount.dsr++;
        }
 
-       wake_up_interruptible(&up->port.state->delta_msr_wait);
+       wake_up_interruptible(&up->port.state->port.delta_msr_wait);
 }
 
 static irqreturn_t sunsab_interrupt(int irq, void *dev_id)
index 5a32365b58adbf66248183b670154873cf7474cf..68d262b15749584354defe8c5bf7a886383dad76 100644 (file)
@@ -441,7 +441,7 @@ static void check_modem_status(struct uart_sunsu_port *up)
        if (status & UART_MSR_DCTS)
                uart_handle_cts_change(&up->port, status & UART_MSR_CTS);
 
-       wake_up_interruptible(&up->port.state->delta_msr_wait);
+       wake_up_interruptible(&up->port.state->port.delta_msr_wait);
 }
 
 static irqreturn_t sunsu_serial_interrupt(int irq, void *dev_id)
index 055034d12b1cf98e2e81800cab4c224b5524a629..ef693ae22e7fc98e307eaf6a16a4d4ce7207fd72 100644 (file)
@@ -451,7 +451,7 @@ static void sunzilog_status_handle(struct uart_sunzilog_port *up,
                        uart_handle_cts_change(&up->port,
                                               (status & CTS));
 
-               wake_up_interruptible(&up->port.state->delta_msr_wait);
+               wake_up_interruptible(&up->port.state->port.delta_msr_wait);
        }
 
        up->prev_status = status;
index 3d40be6f389fc5ba3dea63ea03b8b27f040f65c0..34b31da01d0986bbb1eef820db6a60238ce695e0 100644 (file)
@@ -231,7 +231,7 @@ static void timbuart_mctrl_check(struct uart_port *port, u32 isr, u32 *ier)
                iowrite32(CTS_DELTA, port->membase + TIMBUART_ISR);
                cts = timbuart_get_mctrl(port);
                uart_handle_cts_change(port, cts & TIOCM_CTS);
-               wake_up_interruptible(&port->state->delta_msr_wait);
+               wake_up_interruptible(&port->state->port.delta_msr_wait);
        }
 
        *ier |= CTS_DELTA;
index cf4410e6d53b9f843f1ab1f9523d87ac5802cb68..3beb6ab4fa6888df10523307b15c1b81524961d4 100644 (file)
@@ -386,7 +386,7 @@ static inline void check_modem_status(struct uart_port *port)
        if (msr & UART_MSR_DCTS)
                uart_handle_cts_change(port, msr & UART_MSR_CTS);
 
-       wake_up_interruptible(&port->state->delta_msr_wait);
+       wake_up_interruptible(&port->state->port.delta_msr_wait);
 }
 
 static inline void transmit_chars(struct uart_port *port)
index b9c9fb9198d6e86eda87937b9f4d7c11bcbd1ff7..1a7fd3e703155b68ec98c11276730d8a361b8f80 100644 (file)
@@ -686,7 +686,7 @@ static void zs_status_handle(struct zs_port *zport, struct zs_port *zport_a)
                        uport->icount.rng++;
 
                if (delta)
-                       wake_up_interruptible(&uport->state->delta_msr_wait);
+                       wake_up_interruptible(&uport->state->port.delta_msr_wait);
 
                spin_lock(&scc->zlock);
        }
index bbebef7713b323c71396c0f7a3264b009c08229f..a5049eaf782d09ea7122857548b73444ca4cbadc 100644 (file)
@@ -578,7 +578,6 @@ struct cyclades_port {
        struct cyclades_idle_stats      idle_stats;
        struct cyclades_icount  icount;
        struct completion       shutdown_wait;
-       wait_queue_head_t       delta_msr_wait;
        int throttle;
 };
 
index 940aeb51d53f66019fcc395903ef53ebf824f223..92b08cfe4a752b9ebb73e5973de3f9afba271a6b 100644 (file)
@@ -96,7 +96,6 @@ struct esp_struct {
        int                     xmit_head;
        int                     xmit_tail;
        int                     xmit_cnt;
-       wait_queue_head_t       delta_msr_wait;
        wait_queue_head_t       break_wait;
        struct async_icount     icount; /* kernel counters for the 4 input interrupts */
        struct hayes_esp_config config; /* port configuration */
index 27767ea5fa297f7100bf13fe8f05aac67e48cac1..bcafecd3b7c175878fd74db47970fde36359a217 100644 (file)
@@ -349,7 +349,6 @@ struct uart_state {
        struct circ_buf         xmit;
 
        struct tasklet_struct   tlet;
-       wait_queue_head_t       delta_msr_wait;
        struct uart_port        *uart_port;
 };
 
index 9fdc3d84baadd040eb6ac8af61597f6a8d9b8365..0daa8a72b1768398c06276a1542a45a0f9c09101 100644 (file)
@@ -203,6 +203,7 @@ struct tty_port {
        int                     count;          /* Usage count */
        wait_queue_head_t       open_wait;      /* Open waiters */
        wait_queue_head_t       close_wait;     /* Close waiters */
+       wait_queue_head_t       delta_msr_wait; /* Modem status change */
        unsigned long           flags;          /* TTY flags ASY_*/
        struct mutex            mutex;          /* Locking */
        unsigned char           *xmit_buf;      /* Optional buffer */