Merge "msm: ais: Synchronize v4l2 subscribe and unsubscribe event"
This commit is contained in:
commit
f2604c4f48
1 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -464,7 +464,9 @@ static int camera_v4l2_subscribe_event(struct v4l2_fh *fh,
|
|||
int rc = 0;
|
||||
struct camera_v4l2_private *sp = fh_to_private(fh);
|
||||
|
||||
mutex_lock(&sp->lock);
|
||||
rc = v4l2_event_subscribe(&sp->fh, sub, 5, NULL);
|
||||
mutex_unlock(&sp->lock);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -475,7 +477,9 @@ static int camera_v4l2_unsubscribe_event(struct v4l2_fh *fh,
|
|||
int rc = 0;
|
||||
struct camera_v4l2_private *sp = fh_to_private(fh);
|
||||
|
||||
mutex_lock(&sp->lock);
|
||||
rc = v4l2_event_unsubscribe(&sp->fh, sub);
|
||||
mutex_unlock(&sp->lock);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue