diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2017-01-12 16:10:00 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-01-12 16:10:00 +0800 |
commit | 4cf0662888026d5c1b62ed3fa8dc048a2ff2e124 (patch) | |
tree | a5c92c5024c599a00bfd8d402d2b7b0a619b0259 /drivers/usb/serial/kobil_sct.c | |
parent | c821f6ab2e47946f35ee2f30781c5185e5d07f65 (diff) | |
parent | a121103c922847ba5010819a3f250f1f7fc84ab8 (diff) | |
download | op-kernel-dev-4cf0662888026d5c1b62ed3fa8dc048a2ff2e124.zip op-kernel-dev-4cf0662888026d5c1b62ed3fa8dc048a2ff2e124.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Merging 4.10-rc3 so that the cryptodev tree builds on ARM64.
Diffstat (limited to 'drivers/usb/serial/kobil_sct.c')
-rw-r--r-- | drivers/usb/serial/kobil_sct.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index 2363654..813035f 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c @@ -51,6 +51,7 @@ /* 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); @@ -86,6 +87,7 @@ static struct usb_serial_driver kobil_device = { .description = "KOBIL USB smart card terminal", .id_table = id_table, .num_ports = 1, + .attach = kobil_attach, .port_probe = kobil_port_probe, .port_remove = kobil_port_remove, .ioctl = kobil_ioctl, @@ -113,6 +115,16 @@ 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; |