aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/esp.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/esp.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/esp.c')
-rw-r--r--drivers/char/esp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/esp.c b/drivers/char/esp.c
index 2eaf09f93e3d..7f077c0097f6 100644
--- a/drivers/char/esp.c
+++ b/drivers/char/esp.c
@@ -1725,13 +1725,13 @@ static int esp_tiocmset(struct tty_struct *tty, struct file *file,
1725/* 1725/*
1726 * rs_break() --- routine which turns the break handling on or off 1726 * rs_break() --- routine which turns the break handling on or off
1727 */ 1727 */
1728static void esp_break(struct tty_struct *tty, int break_state) 1728static int esp_break(struct tty_struct *tty, int break_state)
1729{ 1729{
1730 struct esp_struct *info = tty->driver_data; 1730 struct esp_struct *info = tty->driver_data;
1731 unsigned long flags; 1731 unsigned long flags;
1732 1732
1733 if (serial_paranoia_check(info, tty->name, "esp_break")) 1733 if (serial_paranoia_check(info, tty->name, "esp_break"))
1734 return; 1734 return -EINVAL;
1735 1735
1736 if (break_state == -1) { 1736 if (break_state == -1) {
1737 spin_lock_irqsave(&info->lock, flags); 1737 spin_lock_irqsave(&info->lock, flags);
@@ -1747,6 +1747,7 @@ static void esp_break(struct tty_struct *tty, int break_state)
1747 serial_out(info, UART_ESI_CMD2, 0x00); 1747 serial_out(info, UART_ESI_CMD2, 0x00);
1748 spin_unlock_irqrestore(&info->lock, flags); 1748 spin_unlock_irqrestore(&info->lock, flags);
1749 } 1749 }
1750 return 0;
1750} 1751}
1751 1752
1752static int rs_ioctl(struct tty_struct *tty, struct file *file, 1753static int rs_ioctl(struct tty_struct *tty, struct file *file,