summaryrefslogtreecommitdiff
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2017-03-02 12:51:33 +0100
committerJohan Hovold <johan@kernel.org>2017-03-16 10:33:47 +0100
commite2cd017f1b7c2e79b3a89d3c8e31c88ad365243a (patch)
tree8f67e25b9d5b526fa83f6a3bc348be7ce4f55511 /drivers/usb/serial
parentbdd154436077391e40fd20be8ff384d4002b3970 (diff)
USB: serial: symbolserial: simplify endpoint check
Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/symbolserial.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c
index 37f3ad15ed06..0d1727232d0c 100644
--- a/drivers/usb/serial/symbolserial.c
+++ b/drivers/usb/serial/symbolserial.c
@@ -147,16 +147,6 @@ static void symbol_unthrottle(struct tty_struct *tty)
}
}
-static int symbol_startup(struct usb_serial *serial)
-{
- if (!serial->num_interrupt_in) {
- dev_err(&serial->dev->dev, "no interrupt-in endpoint\n");
- return -ENODEV;
- }
-
- return 0;
-}
-
static int symbol_port_probe(struct usb_serial_port *port)
{
struct symbol_private *priv;
@@ -188,7 +178,7 @@ static struct usb_serial_driver symbol_device = {
},
.id_table = id_table,
.num_ports = 1,
- .attach = symbol_startup,
+ .num_interrupt_in = 1,
.port_probe = symbol_port_probe,
.port_remove = symbol_port_remove,
.open = symbol_open,