summaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy/phy-fsm-usb.h
diff options
context:
space:
mode:
authorAnton Tikhomirov <av.tikhomirov@samsung.com>2013-11-26 03:46:05 +0100
committerFelipe Balbi <balbi@ti.com>2013-11-26 17:58:18 +0100
commit16e569e9661ea2b964b8abb607a51e5285254021 (patch)
tree528220cbbd28bb3ab6e16ea0603d9da38a153490 /drivers/usb/phy/phy-fsm-usb.h
parentusb: phy: fsm: protect against multiple inclusions (diff)
downloadlinux-16e569e9661ea2b964b8abb607a51e5285254021.tar.xz
linux-16e569e9661ea2b964b8abb607a51e5285254021.zip
usb: phy: replace spinlock with mutex in OTG FSM
OTG Final State Machine calls functions which may sleep. For example, start_gadget callback implementation can use usb_gadget_vbus_connect(), whose context: can sleep. If so, mutex should be used instead of spinlock. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy/phy-fsm-usb.h')
-rw-r--r--drivers/usb/phy/phy-fsm-usb.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/phy/phy-fsm-usb.h b/drivers/usb/phy/phy-fsm-usb.h
index 200f4d156020..b6ba1bfb86f2 100644
--- a/drivers/usb/phy/phy-fsm-usb.h
+++ b/drivers/usb/phy/phy-fsm-usb.h
@@ -18,7 +18,7 @@
#ifndef __LINUX_USB_OTG_FSM_H
#define __LINUX_USB_OTG_FSM_H
-#include <linux/spinlock.h>
+#include <linux/mutex.h>
#include <linux/errno.h>
#undef VERBOSE
@@ -116,7 +116,7 @@ struct otg_fsm {
/* Current usb protocol used: 0:undefine; 1:host; 2:client */
int protocol;
- spinlock_t lock;
+ struct mutex lock;
};
struct otg_fsm_ops {