Commit 74d81395 authored by Johan Hovold's avatar Johan Hovold
Browse files

USB: serial: digi_acceleport: clean up set_termios



Clean up set_termios() by adding missing white space around operators
and making a couple of continuation lines more readable.

Also drop a couple of redundant braces.

Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent a7f9f290
Loading
Loading
Loading
Loading
+16 −17
Original line number Diff line number Diff line
@@ -765,7 +765,7 @@ static void digi_set_termios(struct tty_struct *tty,
		default:
			dev_dbg(dev,
				"digi_set_termios: can't handle word size %d\n",
				(cflag&CSIZE));
				cflag & CSIZE);
			break;
		}

@@ -794,8 +794,8 @@ static void digi_set_termios(struct tty_struct *tty,
	}

	/* set input flow control */
	if ((iflag&IXOFF) != (old_iflag&IXOFF)
	    || (cflag&CRTSCTS) != (old_cflag&CRTSCTS)) {
	if ((iflag & IXOFF) != (old_iflag & IXOFF) ||
			(cflag & CRTSCTS) != (old_cflag & CRTSCTS)) {
		arg = 0;
		if (iflag & IXOFF)
			arg |= DIGI_INPUT_FLOW_CONTROL_XON_XOFF;
@@ -822,19 +822,18 @@ static void digi_set_termios(struct tty_struct *tty,
	}

	/* set output flow control */
	if ((iflag & IXON) != (old_iflag & IXON)
	    || (cflag & CRTSCTS) != (old_cflag & CRTSCTS)) {
	if ((iflag & IXON) != (old_iflag & IXON) ||
			(cflag & CRTSCTS) != (old_cflag & CRTSCTS)) {
		arg = 0;
		if (iflag & IXON)
			arg |= DIGI_OUTPUT_FLOW_CONTROL_XON_XOFF;
		else
			arg &= ~DIGI_OUTPUT_FLOW_CONTROL_XON_XOFF;

		if (cflag & CRTSCTS) {
		if (cflag & CRTSCTS)
			arg |= DIGI_OUTPUT_FLOW_CONTROL_CTS;
		} else {
		else
			arg &= ~DIGI_OUTPUT_FLOW_CONTROL_CTS;
		}

		buf[i++] = DIGI_CMD_SET_OUTPUT_FLOW_CONTROL;
		buf[i++] = priv->dp_port_num;