Re: [PATCH 11/68] usb-core: Track if an endpoint has streams

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 11/16/2013 08:45 AM, Oliver Neukum wrote:
On Fri, 2013-11-15 at 23:26 +0100, Hans de Goede wrote:
Hi,

On 11/15/2013 11:16 PM, Oliver Neukum wrote:
On Fri, 2013-11-15 at 16:06 +0100, Hans de Goede wrote:
This is a preparation patch for adding support for bulk streams to usbfs.

@@ -2086,19 +2097,30 @@ int usb_free_streams(struct usb_interface *interface,
   {
   	struct usb_hcd *hcd;
   	struct usb_device *dev;
-	int i;
+	int i, ret;

   	dev = interface_to_usbdev(interface);
   	hcd = bus_to_hcd(dev->bus);
   	if (dev->speed != USB_SPEED_SUPER)
   		return -EINVAL;

-	/* Streams only apply to bulk endpoints. */
-	for (i = 0; i < num_eps; i++)
-		if (!eps[i] || !usb_endpoint_xfer_bulk(&eps[i]->desc))

Why bother checking for the endpoint's type?

Not sure what you're trying to say here, the check gets re-added a couple of lines
later in the patch. Are you trying to say the ep type check can be removed entirely?

Yes, the check makes sense on allocation only.

Now that we check that a stream has endpoints, indeed the type check does not make
a whole lot of sense, since only bulk eps will have streams. I'll respin the patch
with the unnecessary check removed.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux