Commit 8c4e938d authored by Rohith Kollalsi's avatar Rohith Kollalsi Committed by Gerrit - the friendly Code Review server
Browse files

usb: f_cdev: Fix failure in function resume in f_cdev



Currently there is a fault in implementation of function suspend
and resume in f_cdev. In case when function suspend is issued
by the host and then cleared, still cser_resume is not being
performed. This is due to incorrect handling of if else
condition in usb_cser_func_suspend. Fix this by adding
proper handling.

Change-Id: I4f0e4c6c02d4b30f2fe0b67bc39a4fac9dbf96f1
Signed-off-by: default avatarRohith Kollalsi <quic_rkollals@quicinc.com>
parent 0db056af
......@@ -610,11 +610,11 @@ static int usb_cser_func_suspend(struct usb_function *f, u8 options)
if (!port->func_is_suspended) {
usb_cser_suspend(f);
port->func_is_suspended = true;
} else {
if (port->func_is_suspended) {
port->func_is_suspended = false;
usb_cser_resume(f);
}
}
} else {
if (port->func_is_suspended) {
port->func_is_suspended = false;
usb_cser_resume(f);
}
}
return 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment