mirror of https://gitee.com/openkylin/linux.git
USB: serial: xr: use termios flag helpers
Use the termios flag helpers consistently, including for CRTSCTS. Signed-off-by: Johan Hovold <johan@kernel.org>
This commit is contained in:
parent
9ffa6ec51c
commit
5c5d9af683
|
@ -401,7 +401,6 @@ static int xr_set_baudrate(struct tty_struct *tty,
|
||||||
static void xr_set_flow_mode(struct tty_struct *tty,
|
static void xr_set_flow_mode(struct tty_struct *tty,
|
||||||
struct usb_serial_port *port)
|
struct usb_serial_port *port)
|
||||||
{
|
{
|
||||||
unsigned int cflag = tty->termios.c_cflag;
|
|
||||||
u8 flow, gpio_mode;
|
u8 flow, gpio_mode;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
@ -409,7 +408,7 @@ static void xr_set_flow_mode(struct tty_struct *tty,
|
||||||
if (ret)
|
if (ret)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (cflag & CRTSCTS) {
|
if (C_CRTSCTS(tty)) {
|
||||||
dev_dbg(&port->dev, "Enabling hardware flow ctrl\n");
|
dev_dbg(&port->dev, "Enabling hardware flow ctrl\n");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue