diff options
author | Alan Cox <alan@redhat.com> | 2008-07-22 06:18:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-22 16:03:28 -0400 |
commit | 9e98966c7bb94355689478bc84cc3e0c190f977e (patch) | |
tree | 928aebbfee524a48aa94a3d3def5249c8846a79a /drivers/char/vme_scc.c | |
parent | abbe629ae4011d2020047f41bea9f9e4b0ec4361 (diff) |
tty: rework break handling
Some hardware needs to do break handling itself and may have partial
support only. Make break_ctl return an error code. Add a tty driver flag
so you can indicate driver hardware side break support.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/vme_scc.c')
-rw-r--r-- | drivers/char/vme_scc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/vme_scc.c b/drivers/char/vme_scc.c index f17ac043b551..69c5afe97f19 100644 --- a/drivers/char/vme_scc.c +++ b/drivers/char/vme_scc.c | |||
@@ -85,7 +85,7 @@ static irqreturn_t scc_rx_int(int irq, void *data); | |||
85 | static irqreturn_t scc_stat_int(int irq, void *data); | 85 | static irqreturn_t scc_stat_int(int irq, void *data); |
86 | static irqreturn_t scc_spcond_int(int irq, void *data); | 86 | static irqreturn_t scc_spcond_int(int irq, void *data); |
87 | static void scc_setsignals(struct scc_port *port, int dtr, int rts); | 87 | static void scc_setsignals(struct scc_port *port, int dtr, int rts); |
88 | static void scc_break_ctl(struct tty_struct *tty, int break_state); | 88 | static int scc_break_ctl(struct tty_struct *tty, int break_state); |
89 | 89 | ||
90 | static struct tty_driver *scc_driver; | 90 | static struct tty_driver *scc_driver; |
91 | 91 | ||
@@ -942,7 +942,7 @@ static int scc_ioctl(struct tty_struct *tty, struct file *file, | |||
942 | } | 942 | } |
943 | 943 | ||
944 | 944 | ||
945 | static void scc_break_ctl(struct tty_struct *tty, int break_state) | 945 | static int scc_break_ctl(struct tty_struct *tty, int break_state) |
946 | { | 946 | { |
947 | struct scc_port *port = (struct scc_port *)tty->driver_data; | 947 | struct scc_port *port = (struct scc_port *)tty->driver_data; |
948 | unsigned long flags; | 948 | unsigned long flags; |
@@ -952,6 +952,7 @@ static void scc_break_ctl(struct tty_struct *tty, int break_state) | |||
952 | SCCmod(TX_CTRL_REG, ~TCR_SEND_BREAK, | 952 | SCCmod(TX_CTRL_REG, ~TCR_SEND_BREAK, |
953 | break_state ? TCR_SEND_BREAK : 0); | 953 | break_state ? TCR_SEND_BREAK : 0); |
954 | local_irq_restore(flags); | 954 | local_irq_restore(flags); |
955 | return 0; | ||
955 | } | 956 | } |
956 | 957 | ||
957 | 958 | ||