]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: take lock while modifying flags
authorPaul Zimmerman <Paul.Zimmerman@synopsys.com>
Sat, 25 Feb 2012 01:32:16 +0000 (17:32 -0800)
committerFelipe Balbi <balbi@ti.com>
Fri, 2 Mar 2012 10:12:10 +0000 (12:12 +0200)
commit2e3d82cbc84f9fd316cc4670af7767c076251538
treef647de409868ab4650ebae3215a9c6ba6112c59c
parent06185445db7cf3666dff60626ac05674471baffb
usb: dwc3: take lock while modifying flags

dwc3_gadget_ep_set_wedge() and dwc3_gadget_set_selfpowered() were
modifying dwc->flags/dwc->is_selfpowered without taking the lock.
Since those modifications are non-atomic, that could cause other
flags to be corrupted. Fix them both to take the lock.

Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/gadget.c