RE: [PATCH v3 5/6] libusbg: Add remove gadget functionality.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Matt Porter [mailto:mporter@xxxxxxxxxx]
> Sent: Thursday, April 03, 2014 3:02 PM
> To: Krzysztof Opasiak
> Cc: linux-usb@xxxxxxxxxxxxxxx; Andrzej Pietrasiewicz; Karol
> Lewandowski; Stanislaw Wadas; ty317.kim@xxxxxxxxxxx; Marek
> Szyprowski; Robert Baldyga
> Subject: Re: [PATCH v3 5/6] libusbg: Add remove gadget
> functionality.
> 
> 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.
> 

Yes, I agree with you. I have renamed this param to opts and provide
suitable define for recurse option.

--
BR's
Krzysiek


--
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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux