Hi, Sorry, please ignore this, I didn't realise this patch was for u-boot.
On Tue, Jul 17, 2018 at 10:45 PM Julian Calaby <julian.cal...@gmail.com> wrote: > > Hi Jagan, > > On Tue, Jul 10, 2018 at 5:17 AM Jagan Teki <ja...@amarulasolutions.com> wrote: > > > > When MUSB is operating in peripheral mode, probe registering > > musb core using musb_register which intern return int value > > for validation. so there is no scope to preserve struct musb > > pointer but the same can be used in .remove musb_stop. > > So fix this by return musb_register with struct musb pointer. > > > > Signed-off-by: Jagan Teki <ja...@amarulasolutions.com> > > --- > > board/compulab/cm_t3517/cm_t3517.c | 4 ++-- > > drivers/usb/musb-new/musb_uboot.c | 10 +++++----- > > drivers/usb/musb-new/pic32.c | 6 ++++-- > > drivers/usb/musb-new/sunxi.c | 8 +++++--- > > include/linux/usb/musb.h | 4 ++-- > > 5 files changed, 18 insertions(+), 14 deletions(-) > > > > diff --git a/drivers/usb/musb-new/musb_uboot.c > > b/drivers/usb/musb-new/musb_uboot.c > > index 2b04fbd046..3cd89793c9 100644 > > --- a/drivers/usb/musb-new/musb_uboot.c > > +++ b/drivers/usb/musb-new/musb_uboot.c > > @@ -436,14 +436,14 @@ int musb_register(struct musb_hdrc_platform_data > > *plat, void *bdata, > > break; > > #endif > > default: > > - return -EINVAL; > > + return NULL; > > These error constants appear to have been chosen specifically, so > would it be nicer to preserve them and use ERR_PTR() and friends to > return them? > > (I know nothing checks them today, but they might be useful in the future) > > > } > > > > *musbp = musb_init_controller(plat, (struct device *)bdata, > > ctl_regs); > > if (!*musbp) { > > printf("Failed to init the controller\n"); > > - return -EIO; > > + return NULL; > > } > > > > - return 0; > > + return *musbp; > > } Thanks, -- Julian Calaby Email: julian.cal...@gmail.com Profile: http://www.google.com/profiles/julian.calaby/ _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot