diff options
| author | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
| commit | 1ac731c529cd4d6adbce134754b51ff7d822b145 (patch) | |
| tree | 143ab3f35ca5f3b69f583c84e6964b17139c2ec1 /drivers/usb/chipidea/otg.c | |
| parent | 07b4c950f27bef0362dc6ad7ee713aab61d58149 (diff) | |
| parent | 54116d442e001e1b6bd482122043b1870998a1f3 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 6.6 merge window.
Diffstat (limited to 'drivers/usb/chipidea/otg.c')
| -rw-r--r-- | drivers/usb/chipidea/otg.c | 5 | 
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c index 622c3b68aa1e..f5490f2a5b6b 100644 --- a/drivers/usb/chipidea/otg.c +++ b/drivers/usb/chipidea/otg.c @@ -167,8 +167,10 @@ static int hw_wait_vbus_lower_bsv(struct ci_hdrc *ci)  void ci_handle_id_switch(struct ci_hdrc *ci)  { -	enum ci_role role = ci_otg_role(ci); +	enum ci_role role; +	mutex_lock(&ci->mutex); +	role = ci_otg_role(ci);  	if (role != ci->role) {  		dev_dbg(ci->dev, "switching from %s to %s\n",  			ci_role(ci)->name, ci->roles[role]->name); @@ -198,6 +200,7 @@ void ci_handle_id_switch(struct ci_hdrc *ci)  		if (role == CI_ROLE_GADGET)  			ci_handle_vbus_change(ci);  	} +	mutex_unlock(&ci->mutex);  }  /**   * ci_otg_work - perform otg (vbus/id) event handle  |