aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/cyclades.c
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-07-22 06:18:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-22 16:03:28 -0400
commit9e98966c7bb94355689478bc84cc3e0c190f977e (patch)
tree928aebbfee524a48aa94a3d3def5249c8846a79a /drivers/char/cyclades.c
parentabbe629ae4011d2020047f41bea9f9e4b0ec4361 (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/cyclades.c')
-rw-r--r--drivers/char/cyclades.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index e991dc85f2fb..fe6d774fe2e4 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -3700,14 +3700,15 @@ cy_tiocmset(struct tty_struct *tty, struct file *file,
3700/* 3700/*
3701 * cy_break() --- routine which turns the break handling on or off 3701 * cy_break() --- routine which turns the break handling on or off
3702 */ 3702 */
3703static void cy_break(struct tty_struct *tty, int break_state) 3703static int cy_break(struct tty_struct *tty, int break_state)
3704{ 3704{
3705 struct cyclades_port *info = tty->driver_data; 3705 struct cyclades_port *info = tty->driver_data;
3706 struct cyclades_card *card; 3706 struct cyclades_card *card;
3707 unsigned long flags; 3707 unsigned long flags;
3708 int retval = 0;
3708 3709
3709 if (serial_paranoia_check(info, tty->name, "cy_break")) 3710 if (serial_paranoia_check(info, tty->name, "cy_break"))
3710 return; 3711 return -EINVAL;
3711 3712
3712 card = info->card; 3713 card = info->card;
3713 3714
@@ -3736,8 +3737,6 @@ static void cy_break(struct tty_struct *tty, int break_state)
3736 } 3737 }
3737 } 3738 }
3738 } else { 3739 } else {
3739 int retval;
3740
3741 if (break_state == -1) { 3740 if (break_state == -1) {
3742 retval = cyz_issue_cmd(card, 3741 retval = cyz_issue_cmd(card,
3743 info->line - card->first_line, 3742 info->line - card->first_line,
@@ -3758,6 +3757,7 @@ static void cy_break(struct tty_struct *tty, int break_state)
3758 } 3757 }
3759 } 3758 }
3760 spin_unlock_irqrestore(&card->card_lock, flags); 3759 spin_unlock_irqrestore(&card->card_lock, flags);
3760 return retval;
3761} /* cy_break */ 3761} /* cy_break */
3762 3762
3763static int get_mon_info(struct cyclades_port *info, 3763static int get_mon_info(struct cyclades_port *info,