kernel/drivers/usb/chipidea/ci.h
.. .. @@ -204,6 +204,7 @@ 204 204 * @in_lpm: if the core in low power mode 205 205 * @wakeup_int: if wakeup interrupt occur 206 206 * @rev: The revision number for controller 207 + * @mutex: protect code from concorrent running when doing role switch207 208 */ 208 209 struct ci_hdrc { 209 210 struct device *dev; .. .. @@ -257,6 +258,7 @@ 257 258 bool in_lpm; 258 259 bool wakeup_int; 259 260 enum ci_revision rev; 261 + struct mutex mutex;260 262 }; 261 263 262 264 static inline struct ci_role_driver *ci_role(struct ci_hdrc *ci)