Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9833facf authored by Alan Cox's avatar Alan Cox Committed by Greg Kroah-Hartman
Browse files

tty: Fix up PPC fallout from the termios move



This fixes up the problem Stephen Rothwell reported when trying to merge -next

Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Reported-by: default avatarStephen Rothwell <sfr@cab.auug.org.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6a6c8b36
Loading
Loading
Loading
Loading
+12 −12
Original line number Original line Diff line number Diff line
@@ -738,27 +738,27 @@ static int get_sgttyb(struct tty_struct *tty, struct sgttyb __user *sgttyb)


static void set_sgflags(struct ktermios *termios, int flags)
static void set_sgflags(struct ktermios *termios, int flags)
{
{
	termios.c_iflag = ICRNL | IXON;
	termios->c_iflag = ICRNL | IXON;
	termios.c_oflag = 0;
	termios->c_oflag = 0;
	termios.c_lflag = ISIG | ICANON;
	termios->c_lflag = ISIG | ICANON;
	if (flags & 0x02) {	/* cbreak */
	if (flags & 0x02) {	/* cbreak */
		termios.c_iflag = 0;
		termios->c_iflag = 0;
		termios.c_lflag &= ~ICANON;
		termios->c_lflag &= ~ICANON;
	}
	}
	if (flags & 0x08) {		/* echo */
	if (flags & 0x08) {		/* echo */
		termios.c_lflag |= ECHO | ECHOE | ECHOK |
		termios->c_lflag |= ECHO | ECHOE | ECHOK |
				    ECHOCTL | ECHOKE | IEXTEN;
				    ECHOCTL | ECHOKE | IEXTEN;
	}
	}
	if (flags & 0x10) {		/* crmod */
	if (flags & 0x10) {		/* crmod */
		termios.c_oflag |= OPOST | ONLCR;
		termios->c_oflag |= OPOST | ONLCR;
	}
	}
	if (flags & 0x20) {	/* raw */
	if (flags & 0x20) {	/* raw */
		termios.c_iflag = 0;
		termios->c_iflag = 0;
		termios.c_lflag &= ~(ISIG | ICANON);
		termios->c_lflag &= ~(ISIG | ICANON);
	}
	}
	if (!(termios.c_lflag & ICANON)) {
	if (!(termios->c_lflag & ICANON)) {
		termios.c_cc[VMIN] = 1;
		termios->c_cc[VMIN] = 1;
		termios.c_cc[VTIME] = 0;
		termios->c_cc[VTIME] = 0;
	}
	}
}
}