Dear Matt, In this series of patch I have fixed some bugs introduced some time ago. First of it was a copy-pasta bug in functions which allocates memory and the second one was missing read of bcdDevice gadget attribute. Second part of this series contains small rework of libusbg API. In those patches I have change functions related to configuration and function. Currently when user would like to get a function, he should pass the whole name as in ConfigFS, but user should not need to know what is the naming convention of this file system. After those patches user will specify function type and instance name instead of string with file name from ConfigFS. Similar changes has been done in configuration related functions. After my changes user will have to specify only the ID (number) for configuration. Label may be omitted and library will use some default name. ID of configuration is unique so it's enough to get configuration. This series of patch depends on patches from github pull request #1. You can also find those patches in pull request #2. Please review and merge. -- BR's Krzysztof Opasiak Samsung R&D Institute Poland --- Changes since v1: -replace malloc(sizeof(type_name)) with malloc(sizeof(*var)) Krzysztof Opasiak (5): libusbg: Fix missing read of bcdDevice. libusbg: Fix wrong malloc sizes in allocate functions. libusbg: Add checking for legal function type. libusbg: Replace usage of function name with type and instance. libusbg: Use config ID and label instead of config name. examples/gadget-acm-ecm.c | 4 +- examples/show-gadgets.c | 29 +-- include/usbg/usbg.h | 64 ++++--- src/usbg.c | 455 ++++++++++++++++++++++++++++++--------------- 4 files changed, 367 insertions(+), 185 deletions(-) -- 1.7.9.5 -- 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