[U-Boot] [PATCH 1/2] usb: common: provide a _weak board_usb_cleanup() function

Marek Vasut marex at denx.de
Tue Feb 24 18:34:40 CET 2015


On Tuesday, February 24, 2015 at 05:05:29 PM, Lukasz Majewski wrote:
> Hi Lukasz,

Hi Lukasz,

is your other self doing good too ? ;-)

> > Hi Marek
> > 
> > > This patch implement _weak function for board_usb_cleanup.
> > > This function (usb_board_cleanup) implementation is board-specific
> > > feature.
> > > 
> > > board_usb_cleanup function can be used to clean up after failed
> > > board-specific USB initialization.
> > > 
> > > Signed-off-by: Inha Song <ideal.song at samsung.com>
> > > ---
> > > 
> > >  common/usb.c | 6 ++++++
> > >  1 file changed, 6 insertions(+)
> > > 
> > > diff --git a/common/usb.c b/common/usb.c
> > > index 736cd9f..fbb4495 100644
> > > --- a/common/usb.c
> > > +++ b/common/usb.c
> > > @@ -1063,4 +1063,10 @@ int board_usb_init(int index, enum
> > > usb_init_type init) {
> > > 
> > >  	return 0;
> > >  
> > >  }
> > > 
> > > +
> > > +__weak
> > > +int board_usb_cleanup(int index, enum usb_init_type init)
> > > +{
> > > +	return 0;
> > > +}
> > > 
> > >  /* EOF */
> > 
> > Acked-by: Lukasz Majewski <l.majewski at samsung.com>
> > 
> > Marek could you take this patch (and the following one) to -usb tree?
> 
> I've looked a bit more deep into this and it seems like this code is
> also defined in patches provided by Kishon:
> 
> "common: cmd_dfu: invoke board_usb_cleanup() for cleaning up"
> b607ea5d62bb0c295f10af86a6de6b33dd1fea75
> 
> Marek, it is your call to decide how we should proceed.
> 
> My recommendation - we should use Kishon's patches, since it is the
> part of a larger patchset.

I'll stick with your recommendation, though I'd like to -- somehow -- work
in Inha's credit into those patches too. What do you think please ?

Best regards,
Marek Vasut


More information about the U-Boot mailing list