Re: [patch 1/1] staging: speakup: flush tty buffers and ensure hardware flow control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +	if (!(tmp_termios.c_cflag & CRTSCTS)) {
> +		tmp_termios.c_cflag |= CRTSCTS;
> +		ret = tty_set_termios(tty, &tmp_termios);
> +		if (ret)
> +			pr_warn("speakup: Failed to set hardware flow control\n");

You should check the tty c_cflag after the call rather than rely on an
error code. Strictly speaking tty_set_termios should error if no tty bits
are changed by the request but it never has on Linux. Instead check the
tty gave you the result you wanted.

Alan
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux