diff options
Diffstat (limited to 'drivers/char/synclinkmp.c')
-rw-r--r-- | drivers/char/synclinkmp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c index 26de60efe4b2..6f727e3c53ad 100644 --- a/drivers/char/synclinkmp.c +++ b/drivers/char/synclinkmp.c | |||
@@ -3277,13 +3277,16 @@ static int carrier_raised(struct tty_port *port) | |||
3277 | return (info->serial_signals & SerialSignal_DCD) ? 1 : 0; | 3277 | return (info->serial_signals & SerialSignal_DCD) ? 1 : 0; |
3278 | } | 3278 | } |
3279 | 3279 | ||
3280 | static void raise_dtr_rts(struct tty_port *port) | 3280 | static void dtr_rts(struct tty_port *port, int on) |
3281 | { | 3281 | { |
3282 | SLMP_INFO *info = container_of(port, SLMP_INFO, port); | 3282 | SLMP_INFO *info = container_of(port, SLMP_INFO, port); |
3283 | unsigned long flags; | 3283 | unsigned long flags; |
3284 | 3284 | ||
3285 | spin_lock_irqsave(&info->lock,flags); | 3285 | spin_lock_irqsave(&info->lock,flags); |
3286 | info->serial_signals |= SerialSignal_RTS + SerialSignal_DTR; | 3286 | if (on) |
3287 | info->serial_signals |= SerialSignal_RTS + SerialSignal_DTR; | ||
3288 | else | ||
3289 | info->serial_signals &= ~(SerialSignal_RTS + SerialSignal_DTR); | ||
3287 | set_signals(info); | 3290 | set_signals(info); |
3288 | spin_unlock_irqrestore(&info->lock,flags); | 3291 | spin_unlock_irqrestore(&info->lock,flags); |
3289 | } | 3292 | } |
@@ -3746,7 +3749,7 @@ static void add_device(SLMP_INFO *info) | |||
3746 | 3749 | ||
3747 | static const struct tty_port_operations port_ops = { | 3750 | static const struct tty_port_operations port_ops = { |
3748 | .carrier_raised = carrier_raised, | 3751 | .carrier_raised = carrier_raised, |
3749 | .raise_dtr_rts = raise_dtr_rts, | 3752 | .dtr_rts = dtr_rts, |
3750 | }; | 3753 | }; |
3751 | 3754 | ||
3752 | /* Allocate and initialize a device instance structure | 3755 | /* Allocate and initialize a device instance structure |