a4c39c41bf
Define three new descriptor manipulation utilities, for use when setting up functions that may have multiple instances: usb_copy_descriptors() to copy a vector of descriptors usb_free_descriptors() to free the copy usb_find_endpoint() to find a copied version These will be used as follows. Functions will continue to have static tables of descriptors they update, now used as __initdata templates. When a function creates a new instance, it patches those tables with relevant interface and string IDs, plus endpoint assignments. Then it copies those morphed descriptors, associates the copies with the new function instance, and records the endpoint descriptors to use when activating the endpoints. When initialization is done, only the copies remain in memory. The copies are freed on driver removal. This ensures that each instance has descriptors which hold the right instance-specific data. Two instances in the same configuration will obviously never share the same interface IDs or use the same endpoints. Instances in different configurations won't do so either, which means this is slightly less memory-efficient in some cases. This also includes a bugfix to the epautoconf code that shows up with this usage model. It must replace the previous endpoint number when updating the template descriptors, not just mask in a few more bits. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
||
---|---|---|
.. | ||
amd5536udc.c | ||
amd5536udc.h | ||
at91_udc.c | ||
at91_udc.h | ||
atmel_usba_udc.c | ||
atmel_usba_udc.h | ||
config.c | ||
dummy_hcd.c | ||
epautoconf.c | ||
ether.c | ||
file_storage.c | ||
fsl_usb2_udc.c | ||
fsl_usb2_udc.h | ||
gadget_chips.h | ||
gmidi.c | ||
goku_udc.c | ||
goku_udc.h | ||
inode.c | ||
Kconfig | ||
lh7a40x_udc.c | ||
lh7a40x_udc.h | ||
m66592-udc.c | ||
m66592-udc.h | ||
Makefile | ||
ndis.h | ||
net2280.c | ||
net2280.h | ||
omap_udc.c | ||
omap_udc.h | ||
printer.c | ||
pxa25x_udc.c | ||
pxa25x_udc.h | ||
pxa27x_udc.c | ||
pxa27x_udc.h | ||
rndis.c | ||
rndis.h | ||
s3c2410_udc.c | ||
s3c2410_udc.h | ||
serial.c | ||
u_serial.c | ||
u_serial.h | ||
usbstring.c | ||
zero.c |