aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/pcmcia
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/pcmcia
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/pcmcia')
-rw-r--r--drivers/char/pcmcia/synclink_cs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index b694d430f10..d1fceabe3ae 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -2230,7 +2230,7 @@ static int tiocmset(struct tty_struct *tty, struct file *file,
2230 * Arguments: tty pointer to tty instance data 2230 * Arguments: tty pointer to tty instance data
2231 * break_state -1=set break condition, 0=clear 2231 * break_state -1=set break condition, 0=clear
2232 */ 2232 */
2233static void mgslpc_break(struct tty_struct *tty, int break_state) 2233static int mgslpc_break(struct tty_struct *tty, int break_state)
2234{ 2234{
2235 MGSLPC_INFO * info = (MGSLPC_INFO *)tty->driver_data; 2235 MGSLPC_INFO * info = (MGSLPC_INFO *)tty->driver_data;
2236 unsigned long flags; 2236 unsigned long flags;
@@ -2240,7 +2240,7 @@ static void mgslpc_break(struct tty_struct *tty, int break_state)
2240 __FILE__,__LINE__, info->device_name, break_state); 2240 __FILE__,__LINE__, info->device_name, break_state);
2241 2241
2242 if (mgslpc_paranoia_check(info, tty->name, "mgslpc_break")) 2242 if (mgslpc_paranoia_check(info, tty->name, "mgslpc_break"))
2243 return; 2243 return -EINVAL;
2244 2244
2245 spin_lock_irqsave(&info->lock,flags); 2245 spin_lock_irqsave(&info->lock,flags);
2246 if (break_state == -1) 2246 if (break_state == -1)
@@ -2248,6 +2248,7 @@ static void mgslpc_break(struct tty_struct *tty, int break_state)
2248 else 2248 else
2249 clear_reg_bits(info, CHA+DAFO, BIT6); 2249 clear_reg_bits(info, CHA+DAFO, BIT6);
2250 spin_unlock_irqrestore(&info->lock,flags); 2250 spin_unlock_irqrestore(&info->lock,flags);
2251 return 0;
2251} 2252}
2252 2253
2253/* Service an IOCTL request 2254/* Service an IOCTL request