Simplify the endpoint sanity check by letting core verify that the
required endpoints are present.

Signed-off-by: Johan Hovold <jo...@kernel.org>
---
 drivers/usb/serial/symbolserial.c | 12 +-----------
 1 file changed, 1 insertion(+), 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,
-- 
2.12.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to