Hi Sebastian, W dniu 25.11.2014 o 18:35, Sebastian Andrzej Siewior pisze:
We have global descriptors. This is okay as long as we use them read-only. Writting the endpoint address is not *that* bad as long as two functions of the same kind are not used in parallel.
<snip>
Any suggestions, ideas?
I've read your mail only today. I can't analyze it at the moment, but I have one doubt right now, please see below.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> --- drivers/usb/gadget/config.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
There is no change in any header file. <snip>
+struct usb_descriptor_header *usb_get_cdesc(struct usb_descriptor_header **hdr, + struct usb_descriptor_header *desc, + struct usb_descriptor_header **c) +{ + unsigned off; + + for (off = 0; hdr[off] && c[off]; off++) { + if (hdr[off] == desc) + break; + } + if (!hdr[off] || !c[off]) + return NULL; + return c[off]; +} +EXPORT_SYMBOL_GPL(usb_get_cdesc); +
If usb_get_cdesc() is newly added _and_ EXPORTed, it is intended for use by other modules, and if that is the case, the other modules should probably be able to see its prototype for compilation, shouldn't they? AP -- 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