diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2011-04-04 00:09:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-13 18:44:00 -0400 |
commit | 2c2da1799ba776c4bd8d51ee46d9f00cb4cc6120 (patch) | |
tree | 2695612408a89e40fb180e44065e8a616f942609 /drivers/usb | |
parent | 0291303d37585ab9056bae9fac1d1e13ae1ce913 (diff) |
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 <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/r8a66597-udc.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) | |||
1083 | 1083 | ||
1084 | if (dvsq == DS_DFLT) { | 1084 | if (dvsq == DS_DFLT) { |
1085 | /* bus reset */ | 1085 | /* bus reset */ |
1086 | spin_unlock(&r8a66597->lock); | ||
1086 | r8a66597->driver->disconnect(&r8a66597->gadget); | 1087 | r8a66597->driver->disconnect(&r8a66597->gadget); |
1088 | spin_lock(&r8a66597->lock); | ||
1087 | r8a66597_update_usb_speed(r8a66597); | 1089 | r8a66597_update_usb_speed(r8a66597); |
1088 | } | 1090 | } |
1089 | if (r8a66597->old_dvsq == DS_CNFG && dvsq != DS_CNFG) | 1091 | if (r8a66597->old_dvsq == DS_CNFG && dvsq != DS_CNFG) |