-
Alan Stern authored
This is a revised version of an earlier patch; I feel a lot better about this one. Basically it does the same thing as before: allocate interfaces dynamically to avoid the problems with reusing them. The difference is that this patch adds a struct kref to the array of usb_interface_cache's, so the array can persist if needed after the device has been disconnected. Each interface takes a reference to it (along with the configuration itself), so as long as the interfaces remain pinned in memory the altsettings will also remain. Here is a slight revision of patch as246b. This one allocates all the new interfaces before changing any other state; otherwise it's the same.
9df38a80