aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/rocket.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/rocket.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/rocket.c')
-rw-r--r--drivers/char/rocket.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index e670eae2f510..584d791e84a6 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -1236,13 +1236,13 @@ static void rp_set_termios(struct tty_struct *tty,
1236 } 1236 }
1237} 1237}
1238 1238
1239static void rp_break(struct tty_struct *tty, int break_state) 1239static int rp_break(struct tty_struct *tty, int break_state)
1240{ 1240{
1241 struct r_port *info = (struct r_port *) tty->driver_data; 1241 struct r_port *info = (struct r_port *) tty->driver_data;
1242 unsigned long flags; 1242 unsigned long flags;
1243 1243
1244 if (rocket_paranoia_check(info, "rp_break")) 1244 if (rocket_paranoia_check(info, "rp_break"))
1245 return; 1245 return -EINVAL;
1246 1246
1247 spin_lock_irqsave(&info->slock, flags); 1247 spin_lock_irqsave(&info->slock, flags);
1248 if (break_state == -1) 1248 if (break_state == -1)
@@ -1250,6 +1250,7 @@ static void rp_break(struct tty_struct *tty, int break_state)
1250 else 1250 else
1251 sClrBreak(&info->channel); 1251 sClrBreak(&info->channel);
1252 spin_unlock_irqrestore(&info->slock, flags); 1252 spin_unlock_irqrestore(&info->slock, flags);
1253 return 0;
1253} 1254}
1254 1255
1255/* 1256/*