Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Upgrade to 4.4.50-rt62
[kvmfornfv.git]
/
kernel
/
drivers
/
usb
/
serial
/
iuu_phoenix.c
diff --git
a/kernel/drivers/usb/serial/iuu_phoenix.c
b/kernel/drivers/usb/serial/iuu_phoenix.c
index
5ad4a0f
..
7ed7d33
100644
(file)
--- a/
kernel/drivers/usb/serial/iuu_phoenix.c
+++ b/
kernel/drivers/usb/serial/iuu_phoenix.c
@@
-68,6
+68,16
@@
struct iuu_private {
u32 clk;
};
u32 clk;
};
+static int iuu_attach(struct usb_serial *serial)
+{
+ unsigned char num_ports = serial->num_ports;
+
+ if (serial->num_bulk_in < num_ports || serial->num_bulk_out < num_ports)
+ return -ENODEV;
+
+ return 0;
+}
+
static int iuu_port_probe(struct usb_serial_port *port)
{
struct iuu_private *priv;
static int iuu_port_probe(struct usb_serial_port *port)
{
struct iuu_private *priv;
@@
-1196,6
+1206,7
@@
static struct usb_serial_driver iuu_device = {
.tiocmset = iuu_tiocmset,
.set_termios = iuu_set_termios,
.init_termios = iuu_init_termios,
.tiocmset = iuu_tiocmset,
.set_termios = iuu_set_termios,
.init_termios = iuu_init_termios,
+ .attach = iuu_attach,
.port_probe = iuu_port_probe,
.port_remove = iuu_port_remove,
};
.port_probe = iuu_port_probe,
.port_remove = iuu_port_remove,
};