Dear Matt, This series adds usbg_udc structure to remove direct udc name usage. Before this series UDC didn't have its own structure. Gadget enable took const char * as parameter. Such approach is inconsisten with rest of API. This series introduce structure usbg_udc as abstraction of UDC. This makes API more consistent and some functions (like enable gadget) are now shorter and easier to read. Moreover usage of such structure allows to implement usbg_get_udc_gadget() which provides possibility to check which gadget is enabled on selected UDC. I'm looking froward for your review and merge if you find it suitable. I have also created a github pull request: https://github.com/libusbg/libusbg/pull/10 Please notice that this series depends on previous one with fixes: https://github.com/libusbg/libusbg/pull/11 -- BR's Krzysztof Opasiak Samsung R&D Institute Poland Samsung Electronics k.opasiak@xxxxxxxxxxx --- Chages since v1: - Move fixes to separate series - Fix error reported by Philippe De Swert in github pull request @David Laight libusbg: Always add '\0' at end of string has been fixed as you suggested but it has been moved to separate series along with other fixes Krzysztof Opasiak (6): libusbg: Add udc structure libusbg: Replace usbg_get_udcs() with loop libusbg: Rework API to use usbg_udc structure libusbg: Refresh gadget UDC while each usbg_get_gadget_udc() libusbg: Allow to get gadget enabled on given UDC libusbg: Add example how to use usbg_udc structure examples/Makefile.am | 3 +- examples/gadget-vid-pid-remove.c | 12 +- examples/show-gadgets.c | 15 +- examples/show-udcs.c | 61 ++++++++ include/usbg/usbg.h | 81 +++++++++-- src/usbg.c | 288 ++++++++++++++++++++++++++++++-------- 6 files changed, 374 insertions(+), 86 deletions(-) create mode 100644 examples/show-udcs.c -- 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