mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
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: Rohith Kollalsi <quic_rkollals@quicinc.com>
This commit is contained in:
parent
0db056af41
commit
8c4e938dcf
1 changed files with 5 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue