Skip to content
Snippets Groups Projects
Commit db69933c authored by Shuzhen Wang's avatar Shuzhen Wang Committed by Vineeta Srivastava
Browse files

msm: camera: Do not ignore ERESTARTSYS return from wait function


By ignoring ERESTARTSYS return from wait function, the thread
could potentially hold up the freezing of the task for a long
time, causing battery drain.

Bug: 10577806
Signed-off-by: default avatarShuzhen Wang <shuzhenw@codeaurora.org>
Change-Id: I653c06c6bf41b07c811d6bab33e3c839460f45b6
parent c31d0ba0
No related branches found
No related tags found
No related merge requests found
...@@ -691,14 +691,9 @@ int msm_post_event(struct v4l2_event *event, int timeout) ...@@ -691,14 +691,9 @@ int msm_post_event(struct v4l2_event *event, int timeout)
return rc; return rc;
} }
/* should wait on session based condition */
do {
rc = wait_event_interruptible_timeout(cmd_ack->wait, rc = wait_event_interruptible_timeout(cmd_ack->wait,
!list_empty_careful(&cmd_ack->command_q.list), !list_empty_careful(&cmd_ack->command_q.list),
msecs_to_jiffies(timeout)); msecs_to_jiffies(timeout));
if (rc != -ERESTARTSYS)
break;
} while (1);
if (list_empty_careful(&cmd_ack->command_q.list)) { if (list_empty_careful(&cmd_ack->command_q.list)) {
if (!rc) { if (!rc) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment