2014-05-23 8:32 GMT+02:00 Amit Virdi:
> @@ -124,6 +130,9 @@ get_endpoints(struct usbtest_dev *dev, struct
> usb_interface *intf)
> switch (usb_endpoint_type(&e->desc)) {
> case USB_ENDPOINT_XFER_BULK:
> break;
> + case USB_ENDPOINT_XFER_INT:
> + if (dev->info->intr)
> + goto try_intr;
> case USB_ENDPOINT_XFER_ISOC:
> if (dev->info->iso)
> goto try_iso;
> @@ -139,6 +148,15 @@ get_endpoints(struct usbtest_dev *dev, struct
> usb_interface *intf)
I don't think you really mean to fall through to case
USB_ENDPOINT_XFER_ISOC if the test is false, but the logic of that
for-loop is becoming harder to follow
in pseudo code, the switch statement is like this?
case USB_ENDPOINT_XFER_BULK:
set in or out;
break;
case USB_ENDPOINT_XFER_INT:
set int_in or int_out;
break;
case USB_ENDPOINT_XFER_ISOC:
set iso_in or iso_out;
break;
default:
do nothing;
it would be easier to follow even if it adds and indentation level
--
Daniele Forsi
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html