mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
usb: composite: Don't override -EAGAIN return value
usb_gadget_func_wakeup() API calls USB DWC3 controller function wakeup API. This API shall return different error value as below: 1. -EAGAIN if USB controller is into low power mode, 2. -EOPNOTSUPP if function wakeup is not supported, 3. -ETIMEDOUT or -EINVAL if USB dwc3 controller is failing to invoke wakeup notification. -EAGAIN return value is used by USB function driver to retry USB function wakeup on receiving resume callback once USB bus is resumed. Hence don't override -EAGAIN return value. Also replace -ENOTSUPP with -EOPNOTSUPP which is error code used by gagdet framework. Change-Id: I5f392a7b31c169eacc3503191f6e03a72dd95238 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This commit is contained in:
parent
73db1046f1
commit
2daf8ebe5c
1 changed files with 1 additions and 2 deletions
|
|
@ -506,8 +506,7 @@ int usb_func_wakeup(struct usb_function *func)
|
|||
DBG(func->config->cdev,
|
||||
"Function wakeup for %s could not complete due to suspend state. Delayed until after bus resume.\n",
|
||||
func->name ? func->name : "");
|
||||
ret = 0;
|
||||
} else if (ret < 0 && ret != -ENOTSUPP) {
|
||||
} else if (ret < 0 && ret != -EOPNOTSUPP) {
|
||||
ERROR(func->config->cdev,
|
||||
"Failed to wake function %s from suspend state. ret=%d. Canceling USB request.\n",
|
||||
func->name ? func->name : "", ret);
|
||||
|
|
|
|||
Loading…
Reference in a new issue