mirror of
https://github.com/torvalds/linux.git
synced 2024-12-13 22:53:20 +00:00
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>
This commit is contained in:
parent
8ee1592d12
commit
5e5b6444d0
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user