aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/dgrp/dgrp_tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/dgrp/dgrp_tty.c')
-rw-r--r--drivers/staging/dgrp/dgrp_tty.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/staging/dgrp/dgrp_tty.c b/drivers/staging/dgrp/dgrp_tty.c
index 7a9694c1d9c4..30d26029b21e 100644
--- a/drivers/staging/dgrp/dgrp_tty.c
+++ b/drivers/staging/dgrp/dgrp_tty.c
@@ -1319,7 +1319,8 @@ static int dgrp_calculate_txprint_bounds(struct ch_struct *ch, int space,
if (ch->ch_tun.un_open_count != 0 &&
ch->ch_tun.un_tty->ops->chars_in_buffer &&
- ((ch->ch_tun.un_tty->ops->chars_in_buffer)(ch->ch_tun.un_tty) != 0)) {
+ ((ch->ch_tun.un_tty->ops->chars_in_buffer)
+ (ch->ch_tun.un_tty) != 0)) {
*un_flag = UN_PWAIT;
return 0;
}
@@ -1501,7 +1502,8 @@ static int dgrp_tty_write(struct tty_struct *tty,
*/
if (ch->ch_tun.un_open_count != 0 &&
- ((ch->ch_tun.un_tty->ops->chars_in_buffer)(ch->ch_tun.un_tty) != 0)) {
+ ((ch->ch_tun.un_tty->ops->chars_in_buffer)
+ (ch->ch_tun.un_tty) != 0)) {
un->un_flag |= UN_PWAIT;
count = 0;
goto out;
@@ -1666,7 +1668,8 @@ static int dgrp_tty_write(struct tty_struct *tty,
if (n >= t) {
memcpy(ch->ch_tbuf + ch->ch_tin, buf, t);
- if (nd->nd_dpa_debug && nd->nd_dpa_port == PORT_NUM(MINOR(tty_devnum(un->un_tty))))
+ if (nd->nd_dpa_debug && nd->nd_dpa_port ==
+ PORT_NUM(MINOR(tty_devnum(un->un_tty))))
dgrp_dpa_data(nd, 0, (char *) buf, t);
buf += t;
n -= t;
@@ -1675,7 +1678,8 @@ static int dgrp_tty_write(struct tty_struct *tty,
}
memcpy(ch->ch_tbuf + ch->ch_tin, buf, n);
- if (nd->nd_dpa_debug && nd->nd_dpa_port == PORT_NUM(MINOR(tty_devnum(un->un_tty))))
+ if (nd->nd_dpa_debug && nd->nd_dpa_port ==
+ PORT_NUM(MINOR(tty_devnum(un->un_tty))))
dgrp_dpa_data(nd, 0, (char *) buf, n);
buf += n;
ch->ch_tin += n;
@@ -2656,7 +2660,8 @@ static int dgrp_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
ch->ch_send |= RR_RX_FLUSH;
(ch->ch_nd)->nd_tx_work = 1;
(ch->ch_nd)->nd_tx_ready = 1;
- wake_up_interruptible(&(ch->ch_nd)->nd_tx_waitq);
+ wake_up_interruptible(
+ &(ch->ch_nd)->nd_tx_waitq);
}
if (arg == TCIFLUSH)
break;
@@ -2682,7 +2687,8 @@ static int dgrp_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
Linux HPUX Function
TCSETA TCSETA - set the termios
TCSETAF TCSETAF - wait for drain first, then set termios
- TCSETAW TCSETAW - wait for drain, flush the input queue, then set termios
+ TCSETAW TCSETAW - wait for drain,
+ flush the input queue, then set termios
- looking at the tty_ioctl code, these command all call our
tty_set_termios at the driver's end, when a TCSETA* is sent,
it is expecting the tty to have a termio structure,
@@ -2798,6 +2804,7 @@ static int dgrp_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
}
/* pretend we didn't recognize this */
+ /* fall-through */
case DIGI_SETA:
return dgrp_tty_digiseta(tty, (struct digi_struct *) arg);
@@ -3207,7 +3214,8 @@ dgrp_tty_init(struct nd_struct *nd)
int max_majors = 1U << (32 - MINORBITS);
for (i = 256; i < max_majors; i++) {
nd->nd_serial_ttdriver->major = i;
- rc = tty_register_driver(nd->nd_serial_ttdriver);
+ rc = tty_register_driver
+ (nd->nd_serial_ttdriver);
if (rc >= 0)
break;
}