aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tty_ioctl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c
index 2b6a3847a9ee..3423e9ee6481 100644
--- a/drivers/char/tty_ioctl.c
+++ b/drivers/char/tty_ioctl.c
@@ -261,13 +261,12 @@ void tty_termios_encode_baud_rate(struct ktermios *termios, speed_t ibaud, speed
261 termios->c_cflag |= (baud_bits[i] << IBSHIFT); 261 termios->c_cflag |= (baud_bits[i] << IBSHIFT);
262 ifound = i; 262 ifound = i;
263 } 263 }
264 } 264 } while (++i < n_baud_table);
265 while(++i < n_baud_table);
266 if (ofound == -1) 265 if (ofound == -1)
267 termios->c_cflag |= BOTHER; 266 termios->c_cflag |= BOTHER;
268 /* Set exact input bits only if the input and output differ or the 267 /* Set exact input bits only if the input and output differ or the
269 user already did */ 268 user already did */
270 if (ifound == -1 && (ibaud != obaud || ibinput)) 269 if (ifound == -1 && (ibaud != obaud || ibinput))
271 termios->c_cflag |= (BOTHER << IBSHIFT); 270 termios->c_cflag |= (BOTHER << IBSHIFT);
272} 271}
273 272
@@ -560,7 +559,7 @@ static int set_sgttyb(struct tty_struct * tty, struct sgttyb __user * sgttyb)
560 return -EFAULT; 559 return -EFAULT;
561 560
562 mutex_lock(&tty->termios_mutex); 561 mutex_lock(&tty->termios_mutex);
563 termios = *tty->termios; 562 termios = *tty->termios;
564 termios.c_cc[VERASE] = tmp.sg_erase; 563 termios.c_cc[VERASE] = tmp.sg_erase;
565 termios.c_cc[VKILL] = tmp.sg_kill; 564 termios.c_cc[VKILL] = tmp.sg_kill;
566 set_sgflags(&termios, tmp.sg_flags); 565 set_sgflags(&termios, tmp.sg_flags);