Skip to content

Commit

Permalink
usb: r8a66597-udc: fix spinlock usage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yoshihiro Shimoda authored and Greg Kroah-Hartman committed Apr 13, 2011
1 parent 0291303 commit 2c2da17
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/gadget/r8a66597-udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2c2da17

Please sign in to comment.