Simplify the endpoint sanity check by letting core verify that the
required endpoints are present.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
.description = "IR Dongle",
.id_table = ir_id_table,
.num_ports = 1,
+ .num_bulk_in = 1,
+ .num_bulk_out = 1,
.set_termios = ir_set_termios,
.attach = ir_startup,
.write = ir_write,
struct usb_irda_cs_descriptor *irda_desc;
int rates;
- if (serial->num_bulk_in < 1 || serial->num_bulk_out < 1)
- return -ENODEV;
-
irda_desc = irda_usb_find_class_desc(serial, 0);
if (!irda_desc) {
dev_err(&serial->dev->dev,