From 16e569e9661ea2b964b8abb607a51e5285254021 Mon Sep 17 00:00:00 2001 From: Anton Tikhomirov Date: Tue, 26 Nov 2013 11:46:05 +0900 Subject: 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 Signed-off-by: Felipe Balbi --- drivers/usb/phy/phy-fsm-usb.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb/phy/phy-fsm-usb.h') 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 +#include #include #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 { -- cgit