Merge "msm: ais: Synchronize v4l2 subscribe and unsubscribe event"

This commit is contained in:
Linux Build Service Account 2018-02-09 17:07:17 -08:00 committed by Gerrit - the friendly Code Review server
commit f2604c4f48

View file

@ -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;
}