diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2009-06-11 07:24:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 11:50:56 -0400 |
commit | fcc8ac1825d3d0fb81f73bc1a80ebc863168bb56 (patch) | |
tree | 737f7209430fd319ca257df62c9b1e64587d5a8b /drivers/char/stallion.c | |
parent | 65a29f60e121ae5116ac1736b50a237bf2db3225 (diff) |
tty: Add carrier processing on close to the tty_port core
Some drivers implement this internally, others miss it out. Push the
behaviour into the core code as that way everyone will do it consistently.
Update the dtr rts method to raise or lower depending upon flags. Having a
single method in this style fits most of the implementations more cleanly than
two funtions.
We need this in place before we tackle the USB side
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/stallion.c')
-rw-r--r-- | drivers/char/stallion.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index 2ad813a801dc..53e504f41b20 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c | |||
@@ -772,11 +772,11 @@ static int stl_carrier_raised(struct tty_port *port) | |||
772 | return (portp->sigs & TIOCM_CD) ? 1 : 0; | 772 | return (portp->sigs & TIOCM_CD) ? 1 : 0; |
773 | } | 773 | } |
774 | 774 | ||
775 | static void stl_raise_dtr_rts(struct tty_port *port) | 775 | static void stl_dtr_rts(struct tty_port *port, int on) |
776 | { | 776 | { |
777 | struct stlport *portp = container_of(port, struct stlport, port); | 777 | struct stlport *portp = container_of(port, struct stlport, port); |
778 | /* Takes brd_lock internally */ | 778 | /* Takes brd_lock internally */ |
779 | stl_setsignals(portp, 1, 1); | 779 | stl_setsignals(portp, on, on); |
780 | } | 780 | } |
781 | 781 | ||
782 | /*****************************************************************************/ | 782 | /*****************************************************************************/ |
@@ -2547,7 +2547,7 @@ static const struct tty_operations stl_ops = { | |||
2547 | 2547 | ||
2548 | static const struct tty_port_operations stl_port_ops = { | 2548 | static const struct tty_port_operations stl_port_ops = { |
2549 | .carrier_raised = stl_carrier_raised, | 2549 | .carrier_raised = stl_carrier_raised, |
2550 | .raise_dtr_rts = stl_raise_dtr_rts, | 2550 | .dtr_rts = stl_dtr_rts, |
2551 | }; | 2551 | }; |
2552 | 2552 | ||
2553 | /*****************************************************************************/ | 2553 | /*****************************************************************************/ |