Ajay >-----Original Message----- >From: Gupta, Ajay Kumar >> Subject: [PATCH 2/3] USB: musb: omap: Fix wrong xceivr passing to twl4030 >> >> Wrong pointer was getting passed to twl4030 transceiver. >> >> Call path is: >> otg_set_suspend -> twl4030_set_suspend >> >> drivers/usb/otg/twl4030-usb.c: twl4030_set_suspend() uses: >> struct twl4030_usb *twl = xceiv_to_twl(x); >> >> and xceiv_to_twl is container_of() >> >> So the same pointer needs to be passed to otg_set_suspend() as has >> been used for otg_set_transceiver. >> >> A crash is seen without this patch, as twl pointer access is worng >> > >musb->xceiv is also taken from otg_get_transceiver() in musb_platform_init(). So this patch is not >required. Thanks for pointing this out. I will repost a set of 2 patches with this patch removed. Patches on their way. > >-Ajay > >> Signed-off-by: Vikram Pandita <vikram.pandita@xxxxxx> >> --- >> drivers/usb/musb/omap2430.c | 4 ++-- >> 1 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c >> index b957575..ea7a798 100644 >> --- a/drivers/usb/musb/omap2430.c >> +++ b/drivers/usb/musb/omap2430.c >> @@ -269,7 +269,7 @@ int musb_platform_suspend(struct musb *musb) >> l |= ENABLEWAKEUP; /* enable wakeup */ >> omap_writel(l, OTG_SYSCONFIG); >> >> - otg_set_suspend(musb->xceiv, 1); >> + otg_set_suspend(otg_get_transceiver(), 1); >> >> if (musb->set_clock) >> musb->set_clock(musb->clock, 0); >> @@ -286,7 +286,7 @@ int musb_platform_resume(struct musb *musb) >> if (!musb->clock) >> return 0; >> >> - otg_set_suspend(musb->xceiv, 0); >> + otg_set_suspend(otg_get_transceiver(), 0); >> >> if (musb->set_clock) >> musb->set_clock(musb->clock, 1); >> -- >> 1.6.3.3.334.g916e1 -- 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