usb: dwc2: gadget: add mutex to serialize init/deinit calls
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 21 Nov 2014 14:14:48 +0000 (15:14 +0100)
committerFelipe Balbi <balbi@ti.com>
Fri, 21 Nov 2014 15:07:38 +0000 (09:07 -0600)
commit7ad8096edfe0529eabb3ad466184c8fbd6134e1a
treed9e479cd47769a80c56846db375b339f5df26e77
parent4ace06e8b3c32d6a601474af31580bbc1027fa9f
usb: dwc2: gadget: add mutex to serialize init/deinit calls

This patch adds mutex, which protects initialization and
deinitialization procedures against suspend/resume methods. This mutex
will be needed by the updated suspend/resume calls, which tracks gadget
state.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc2/core.h
drivers/usb/dwc2/gadget.c
drivers/usb/dwc2/platform.c