Hi,

On 10/04/2013 05:37 PM, Alan Stern wrote:
On Fri, 4 Oct 2013, Hans de Goede wrote:

Documentation/usb/bulk-streams.txt says:

All stream IDs will be deallocated when the driver releases the interface, to
ensure that drivers that don't support streams will be able to use the endpoint

This commit actually implements this.

--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -369,8 +369,9 @@ static int usb_unbind_interface(struct device *dev)
  {
        struct usb_driver *driver = to_usb_driver(dev->driver);
        struct usb_interface *intf = to_usb_interface(dev);
+       struct usb_host_endpoint *ep, *eps[USB_MAXENDPOINTS];

That's a big array to put on the stack: 30 entries each containing 8
bytes (on a 64-bit arch).

I was wondering about this myself when I wrote this. What do you suggest
as an alternative, kmalloc an array with 
intf->cur_altsetting->desc.bNumEndpoints
pointers ?

Regards,

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

Reply via email to