diff options
author | Johan Hovold <johan@kernel.org> | 2017-03-02 12:51:26 +0100 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2017-03-16 10:33:44 +0100 |
commit | 35194572b4ede8b021d4c70c8785cd4d5c3fae0a (patch) | |
tree | a63617e299d5963657d758cefc365e939b9f45ac /drivers/usb/serial/kobil_sct.c | |
parent | b714d5dc0631285d2cf237c1d4ed16ba9b68c6fb (diff) |
USB: serial: kobil_sct: 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/kobil_sct.c')
-rw-r--r-- | drivers/usb/serial/kobil_sct.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index 813035f51fe7..3024b9b25360 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c @@ -51,7 +51,6 @@ /* Function prototypes */ -static int kobil_attach(struct usb_serial *serial); static int kobil_port_probe(struct usb_serial_port *probe); static int kobil_port_remove(struct usb_serial_port *probe); static int kobil_open(struct tty_struct *tty, struct usb_serial_port *port); @@ -87,7 +86,7 @@ static struct usb_serial_driver kobil_device = { .description = "KOBIL USB smart card terminal", .id_table = id_table, .num_ports = 1, - .attach = kobil_attach, + .num_interrupt_out = 1, .port_probe = kobil_port_probe, .port_remove = kobil_port_remove, .ioctl = kobil_ioctl, @@ -115,16 +114,6 @@ struct kobil_private { }; -static int kobil_attach(struct usb_serial *serial) -{ - if (serial->num_interrupt_out < serial->num_ports) { - dev_err(&serial->interface->dev, "missing interrupt-out endpoint\n"); - return -ENODEV; - } - - return 0; -} - static int kobil_port_probe(struct usb_serial_port *port) { struct usb_serial *serial = port->serial; |