From felipe.balbi@nokia.com Tue Nov 25 13:27:17 2008 From: David Brownell Date: Mon, 24 Nov 2008 13:06:49 +0200 Subject: USB: musb: minor locking fix To: linux-usb@vger.kernel.org Cc: David Brownell , Felipe Balbi Message-ID: <1227524813-27528-4-git-send-email-felipe.balbi@nokia.com> From: David Brownell Minor locking fix for musb_hdrc on OMAP3 and OMAP2430: don't read DEVCTL without holding the spinlock, since an IRQ could come in and corrupt things. Signed-off-by: David Brownell Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- drivers/usb/musb/omap2430.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -58,10 +58,10 @@ static void musb_do_idle(unsigned long _ #endif u8 devctl; - devctl = musb_readb(musb->mregs, MUSB_DEVCTL); - spin_lock_irqsave(&musb->lock, flags); + devctl = musb_readb(musb->mregs, MUSB_DEVCTL); + switch (musb->xceiv.state) { case OTG_STATE_A_WAIT_BCON: devctl &= ~MUSB_DEVCTL_SESSION;