diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2008-11-24 06:06:49 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-07 12:59:59 -0500 |
commit | 71783e0defa16ca5abca7750df98ff8e7767bd2e (patch) | |
tree | 3e4180012869e613bea9a6175bd8423287218604 | |
parent | 58e660266d92aaa186c3df607c0ee88f18c8f4da (diff) |
USB: 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 <dbrownell@users.sourceforge.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | 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 52988a403b5c..901dffdf23b1 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) | |||
58 | #endif | 58 | #endif |
59 | u8 devctl; | 59 | u8 devctl; |
60 | 60 | ||
61 | devctl = musb_readb(musb->mregs, MUSB_DEVCTL); | ||
62 | |||
63 | spin_lock_irqsave(&musb->lock, flags); | 61 | spin_lock_irqsave(&musb->lock, flags); |
64 | 62 | ||
63 | devctl = musb_readb(musb->mregs, MUSB_DEVCTL); | ||
64 | |||
65 | switch (musb->xceiv.state) { | 65 | switch (musb->xceiv.state) { |
66 | case OTG_STATE_A_WAIT_BCON: | 66 | case OTG_STATE_A_WAIT_BCON: |
67 | devctl &= ~MUSB_DEVCTL_SESSION; | 67 | devctl &= ~MUSB_DEVCTL_SESSION; |