From: Yoshihiro Shimoda Date: Mon, 4 Apr 2011 04:09:22 +0000 (+0900) Subject: usb: r8a66597-udc: fix spinlock usage X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2c2da1799ba776c4bd8d51ee46d9f00cb4cc6120;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git usb: r8a66597-udc: fix spinlock usage Because the disconnect function in the composite driver will call spin_lock, this driver has to call spin_unlock before calling driver->disconnet(). Signed-off-by: Yoshihiro Shimoda Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index 015118535f77..6dcc1f68fa60 100644 --- a/drivers/usb/gadget/r8a66597-udc.c +++ b/drivers/usb/gadget/r8a66597-udc.c @@ -1083,7 +1083,9 @@ static void irq_device_state(struct r8a66597 *r8a66597) if (dvsq == DS_DFLT) { /* bus reset */ + spin_unlock(&r8a66597->lock); r8a66597->driver->disconnect(&r8a66597->gadget); + spin_lock(&r8a66597->lock); r8a66597_update_usb_speed(r8a66597); } if (r8a66597->old_dvsq == DS_CNFG && dvsq != DS_CNFG)