summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/opticon.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2017-03-02 12:51:29 +0100
committerJohan Hovold <johan@kernel.org>2017-03-16 10:33:45 +0100
commit5e5b6444d099ac7b883f5cc112f5415fe619a595 (patch)
treedcb30a13a5119a8036ec948b1b051ebc38e03673 /drivers/usb/serial/opticon.c
parent8ee1592d125a95dc8a554398e014b65ee04cd80c (diff)
USB: serial: opticon: 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/opticon.c')
-rw-r--r--drivers/usb/serial/opticon.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c
index 3937b9c3cc69..58657d64678b 100644
--- a/drivers/usb/serial/opticon.c
+++ b/drivers/usb/serial/opticon.c
@@ -367,16 +367,6 @@ static int opticon_ioctl(struct tty_struct *tty,
return -ENOIOCTLCMD;
}
-static int opticon_startup(struct usb_serial *serial)
-{
- if (!serial->num_bulk_in) {
- dev_err(&serial->dev->dev, "no bulk in endpoint\n");
- return -ENODEV;
- }
-
- return 0;
-}
-
static int opticon_port_probe(struct usb_serial_port *port)
{
struct opticon_private *priv;
@@ -408,8 +398,8 @@ static struct usb_serial_driver opticon_device = {
},
.id_table = id_table,
.num_ports = 1,
+ .num_bulk_in = 1,
.bulk_in_size = 256,
- .attach = opticon_startup,
.port_probe = opticon_port_probe,
.port_remove = opticon_port_remove,
.open = opticon_open,