diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-11-14 08:38:28 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-14 08:38:28 -0500 |
commit | 0c3c35e148dbc03106038dd25816fb9f3a084d86 (patch) | |
tree | 8b8cc6a027353a0f242f61362b35b0942da61b83 /drivers/usb/serial/mct_u232.c | |
parent | 50d40f187f9182ee8caa1b83f80a0e11e2226baa (diff) | |
parent | 5e08fe570c2dbabb5015c37049eb9a451e55c890 (diff) |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'drivers/usb/serial/mct_u232.c')
-rw-r--r-- | drivers/usb/serial/mct_u232.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index ad4998bbf16..cd009cb280a 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c | |||
@@ -777,20 +777,19 @@ static void mct_u232_throttle(struct tty_struct *tty) | |||
777 | { | 777 | { |
778 | struct usb_serial_port *port = tty->driver_data; | 778 | struct usb_serial_port *port = tty->driver_data; |
779 | struct mct_u232_private *priv = usb_get_serial_port_data(port); | 779 | struct mct_u232_private *priv = usb_get_serial_port_data(port); |
780 | unsigned long flags; | ||
781 | unsigned int control_state; | 780 | unsigned int control_state; |
782 | 781 | ||
783 | dbg("%s - port %d", __func__, port->number); | 782 | dbg("%s - port %d", __func__, port->number); |
784 | 783 | ||
785 | spin_lock_irqsave(&priv->lock, flags); | 784 | spin_lock_irq(&priv->lock); |
786 | priv->rx_flags |= THROTTLED; | 785 | priv->rx_flags |= THROTTLED; |
787 | if (C_CRTSCTS(tty)) { | 786 | if (C_CRTSCTS(tty)) { |
788 | priv->control_state &= ~TIOCM_RTS; | 787 | priv->control_state &= ~TIOCM_RTS; |
789 | control_state = priv->control_state; | 788 | control_state = priv->control_state; |
790 | spin_unlock_irqrestore(&priv->lock, flags); | 789 | spin_unlock_irq(&priv->lock); |
791 | (void) mct_u232_set_modem_ctrl(port->serial, control_state); | 790 | (void) mct_u232_set_modem_ctrl(port->serial, control_state); |
792 | } else { | 791 | } else { |
793 | spin_unlock_irqrestore(&priv->lock, flags); | 792 | spin_unlock_irq(&priv->lock); |
794 | } | 793 | } |
795 | } | 794 | } |
796 | 795 | ||
@@ -799,20 +798,19 @@ static void mct_u232_unthrottle(struct tty_struct *tty) | |||
799 | { | 798 | { |
800 | struct usb_serial_port *port = tty->driver_data; | 799 | struct usb_serial_port *port = tty->driver_data; |
801 | struct mct_u232_private *priv = usb_get_serial_port_data(port); | 800 | struct mct_u232_private *priv = usb_get_serial_port_data(port); |
802 | unsigned long flags; | ||
803 | unsigned int control_state; | 801 | unsigned int control_state; |
804 | 802 | ||
805 | dbg("%s - port %d", __func__, port->number); | 803 | dbg("%s - port %d", __func__, port->number); |
806 | 804 | ||
807 | spin_lock_irqsave(&priv->lock, flags); | 805 | spin_lock_irq(&priv->lock); |
808 | if ((priv->rx_flags & THROTTLED) && C_CRTSCTS(tty)) { | 806 | if ((priv->rx_flags & THROTTLED) && C_CRTSCTS(tty)) { |
809 | priv->rx_flags &= ~THROTTLED; | 807 | priv->rx_flags &= ~THROTTLED; |
810 | priv->control_state |= TIOCM_RTS; | 808 | priv->control_state |= TIOCM_RTS; |
811 | control_state = priv->control_state; | 809 | control_state = priv->control_state; |
812 | spin_unlock_irqrestore(&priv->lock, flags); | 810 | spin_unlock_irq(&priv->lock); |
813 | (void) mct_u232_set_modem_ctrl(port->serial, control_state); | 811 | (void) mct_u232_set_modem_ctrl(port->serial, control_state); |
814 | } else { | 812 | } else { |
815 | spin_unlock_irqrestore(&priv->lock, flags); | 813 | spin_unlock_irq(&priv->lock); |
816 | } | 814 | } |
817 | } | 815 | } |
818 | 816 | ||