From: David Brownell Date: Sun, 23 Nov 2008 21:39:48 +0000 (-0800) Subject: musb: minor locking fix X-Git-Tag: v2.6.28-omap1~58^2~15 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=04b93f24460029805faed04e2def41a990a117cf;p=linux-2.6-omap-h63xx.git musb: minor locking fix 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 --- diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 52988a403b5..901dffdf23b 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@ -58,10 +58,10 @@ static void musb_do_idle(unsigned long _musb) #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;