diff options
Diffstat (limited to 'drivers/char/synclink_gt.c')
-rw-r--r-- | drivers/char/synclink_gt.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c index 5e256494686a..67986ea0d479 100644 --- a/drivers/char/synclink_gt.c +++ b/drivers/char/synclink_gt.c | |||
@@ -3099,13 +3099,16 @@ static int carrier_raised(struct tty_port *port) | |||
3099 | return (info->signals & SerialSignal_DCD) ? 1 : 0; | 3099 | return (info->signals & SerialSignal_DCD) ? 1 : 0; |
3100 | } | 3100 | } |
3101 | 3101 | ||
3102 | static void raise_dtr_rts(struct tty_port *port) | 3102 | static void dtr_rts(struct tty_port *port, int on) |
3103 | { | 3103 | { |
3104 | unsigned long flags; | 3104 | unsigned long flags; |
3105 | struct slgt_info *info = container_of(port, struct slgt_info, port); | 3105 | struct slgt_info *info = container_of(port, struct slgt_info, port); |
3106 | 3106 | ||
3107 | spin_lock_irqsave(&info->lock,flags); | 3107 | spin_lock_irqsave(&info->lock,flags); |
3108 | info->signals |= SerialSignal_RTS + SerialSignal_DTR; | 3108 | if (on) |
3109 | info->signals |= SerialSignal_RTS + SerialSignal_DTR; | ||
3110 | else | ||
3111 | info->signals &= ~(SerialSignal_RTS + SerialSignal_DTR); | ||
3109 | set_signals(info); | 3112 | set_signals(info); |
3110 | spin_unlock_irqrestore(&info->lock,flags); | 3113 | spin_unlock_irqrestore(&info->lock,flags); |
3111 | } | 3114 | } |
@@ -3419,7 +3422,7 @@ static void add_device(struct slgt_info *info) | |||
3419 | 3422 | ||
3420 | static const struct tty_port_operations slgt_port_ops = { | 3423 | static const struct tty_port_operations slgt_port_ops = { |
3421 | .carrier_raised = carrier_raised, | 3424 | .carrier_raised = carrier_raised, |
3422 | .raise_dtr_rts = raise_dtr_rts, | 3425 | .dtr_rts = dtr_rts, |
3423 | }; | 3426 | }; |
3424 | 3427 | ||
3425 | /* | 3428 | /* |