aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/synclinkmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/synclinkmp.c')
-rw-r--r--drivers/char/synclinkmp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c
index f2edfad360d3..6bdb44f7bec2 100644
--- a/drivers/char/synclinkmp.c
+++ b/drivers/char/synclinkmp.c
@@ -524,7 +524,7 @@ static int read_proc(char *page, char **start, off_t off, int count,int *eof, v
524static int chars_in_buffer(struct tty_struct *tty); 524static int chars_in_buffer(struct tty_struct *tty);
525static void throttle(struct tty_struct * tty); 525static void throttle(struct tty_struct * tty);
526static void unthrottle(struct tty_struct * tty); 526static void unthrottle(struct tty_struct * tty);
527static void set_break(struct tty_struct *tty, int break_state); 527static int set_break(struct tty_struct *tty, int break_state);
528 528
529#if SYNCLINK_GENERIC_HDLC 529#if SYNCLINK_GENERIC_HDLC
530#define dev_to_port(D) (dev_to_hdlc(D)->priv) 530#define dev_to_port(D) (dev_to_hdlc(D)->priv)
@@ -549,7 +549,7 @@ static int wait_mgsl_event(SLMP_INFO *info, int __user *mask_ptr);
549static int tiocmget(struct tty_struct *tty, struct file *file); 549static int tiocmget(struct tty_struct *tty, struct file *file);
550static int tiocmset(struct tty_struct *tty, struct file *file, 550static int tiocmset(struct tty_struct *tty, struct file *file,
551 unsigned int set, unsigned int clear); 551 unsigned int set, unsigned int clear);
552static void set_break(struct tty_struct *tty, int break_state); 552static int set_break(struct tty_struct *tty, int break_state);
553 553
554static void add_device(SLMP_INFO *info); 554static void add_device(SLMP_INFO *info);
555static void device_init(int adapter_num, struct pci_dev *pdev); 555static void device_init(int adapter_num, struct pci_dev *pdev);
@@ -1584,7 +1584,7 @@ static void unthrottle(struct tty_struct * tty)
1584/* set or clear transmit break condition 1584/* set or clear transmit break condition
1585 * break_state -1=set break condition, 0=clear 1585 * break_state -1=set break condition, 0=clear
1586 */ 1586 */
1587static void set_break(struct tty_struct *tty, int break_state) 1587static int set_break(struct tty_struct *tty, int break_state)
1588{ 1588{
1589 unsigned char RegValue; 1589 unsigned char RegValue;
1590 SLMP_INFO * info = (SLMP_INFO *)tty->driver_data; 1590 SLMP_INFO * info = (SLMP_INFO *)tty->driver_data;
@@ -1595,7 +1595,7 @@ static void set_break(struct tty_struct *tty, int break_state)
1595 __FILE__,__LINE__, info->device_name, break_state); 1595 __FILE__,__LINE__, info->device_name, break_state);
1596 1596
1597 if (sanity_check(info, tty->name, "set_break")) 1597 if (sanity_check(info, tty->name, "set_break"))
1598 return; 1598 return -EINVAL;
1599 1599
1600 spin_lock_irqsave(&info->lock,flags); 1600 spin_lock_irqsave(&info->lock,flags);
1601 RegValue = read_reg(info, CTL); 1601 RegValue = read_reg(info, CTL);
@@ -1605,6 +1605,7 @@ static void set_break(struct tty_struct *tty, int break_state)
1605 RegValue &= ~BIT3; 1605 RegValue &= ~BIT3;
1606 write_reg(info, CTL, RegValue); 1606 write_reg(info, CTL, RegValue);
1607 spin_unlock_irqrestore(&info->lock,flags); 1607 spin_unlock_irqrestore(&info->lock,flags);
1608 return 0;
1608} 1609}
1609 1610
1610#if SYNCLINK_GENERIC_HDLC 1611#if SYNCLINK_GENERIC_HDLC