On Tue, Mar 18, 2014 at 09:29:05PM +0100, Krzysztof Opasiak wrote: > Add function which allow to remove USB gadget. > This functions also remove gadget from internal > library structures what means that after this > operation all pointers to removed gadget are invalid. > > Signed-off-by: Krzysztof Opasiak <k.opasiak@xxxxxxxxxxx> > --- > include/usbg/usbg.h | 10 ++++++++++ > src/usbg.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 64 insertions(+) > > diff --git a/include/usbg/usbg.h b/include/usbg/usbg.h > index f79ace4..cd64eb1 100644 > --- a/include/usbg/usbg.h > +++ b/include/usbg/usbg.h > @@ -300,6 +300,16 @@ extern int usbg_remove_config(usbg_config *c, int recursive); > extern int usbg_remove_function(usbg_function *f, int recursive); > > /** > + * @brief Remove existing USB gadget > + * @details This function frees also the memory allocated for gadget > + * @param g Gadget to be removed > + * @param recursive If different than 0 all configs, functions > + * and strings will be also removed before removing gadget So, regarding my comment on the example's use of API. I think it you should define USBG_RM_RECURSE for use here. -Matt -- 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