Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79614cb2 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti Committed by Gerrit - the friendly Code Review server
Browse files

usb: composite: don't print the invalid function wakeup failure messages



The function level suspend/resume/wakeup are supported in super speed
mode only. The usb_func_wakeup() is called for every function during
resume irrespective of the operating speed. This function returns
-ENOTSUPP when the gadget is not operating in super speed. Don't print
the error message in this case. Otherwise an error message is printed
for each function during high/full speed device resume.

CRs-Fixed: 750230
Change-Id: I6f600fe7fa9a037b83909265229acdc668329d6a
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent 114f9a73
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -436,7 +436,7 @@ int usb_func_wakeup(struct usb_function *func)
			"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) {
	} else if (ret < 0 && ret != -ENOTSUPP) {
		ERROR(func->config->cdev,
			"Failed to wake function %s from suspend state. ret=%d. Canceling USB request.\n",
			func->name ? func->name : "", ret);
@@ -1921,7 +1921,7 @@ composite_resume(struct usb_gadget *gadget)
						"Function wakeup for %s could not complete due to suspend state.\n",
						f->name ? f->name : "");
					break;
				} else {
				} else if (ret != -ENOTSUPP) {
					ERROR(f->config->cdev,
						"Failed to wake function %s from suspend state. ret=%d. Canceling USB request.\n",
						f->name ? f->name : "",