mirror of https://gitee.com/openkylin/linux.git
USB: serial: f81534: clean up calc_num_ports
Clean up calc_num_ports with respect to handling older chips that lack config data. Signed-off-by: Johan Hovold <johan@kernel.org>
This commit is contained in:
parent
d69f138747
commit
5e07240a12
|
@ -681,12 +681,13 @@ static int f81534_calc_num_ports(struct usb_serial *serial,
|
||||||
++num_port;
|
++num_port;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (num_port)
|
if (!num_port) {
|
||||||
return num_port;
|
dev_warn(&serial->interface->dev,
|
||||||
|
"no config found, assuming 4 ports\n");
|
||||||
|
num_port = 4; /* Nothing found, oldest version IC */
|
||||||
|
}
|
||||||
|
|
||||||
dev_warn(&serial->interface->dev, "%s: Read Failed. default 4 ports\n",
|
return num_port;
|
||||||
__func__);
|
|
||||||
return 4; /* Nothing found, oldest version IC */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void f81534_set_termios(struct tty_struct *tty,
|
static void f81534_set_termios(struct tty_struct *tty,
|
||||||
|
|
Loading…
Reference in New Issue