]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: musb_vbus_store(): dont exit with spinlock held
authorKevin Hilman <khilman@mvista.com>
Fri, 31 Aug 2007 23:29:22 +0000 (16:29 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 17 Sep 2007 18:25:29 +0000 (11:25 -0700)
Signed-off-by: Kevin Hilman <khilman@mvista.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
drivers/usb/musb/musb_core.c

index 8a60ac56a37c2cc3773248a8f4977a5e831b217c..9a73de521a868da4a8a464d965d21c94b8bc8ea2 100644 (file)
@@ -1712,11 +1712,12 @@ musb_vbus_store(struct device *dev, struct device_attribute *attr,
        unsigned long   flags;
        unsigned long   val;
 
-       spin_lock_irqsave(&musb->lock, flags);
        if (sscanf(buf, "%lu", &val) < 1) {
                printk(KERN_ERR "Invalid VBUS timeout ms value\n");
                return -EINVAL;
        }
+
+       spin_lock_irqsave(&musb->lock, flags);
        musb->a_wait_bcon = val;
        if (musb->xceiv.state == OTG_STATE_A_WAIT_BCON)
                musb->is_active = 0;