Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275368
b: refs/heads/master
c: 78c87e8
h: refs/heads/master
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Nov 8, 2011
1 parent d1707a3 commit 59b9b03
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b36b505965e374b284166c2e6b9c1d369d663ea9
refs/heads/master: 78c87e863bb3350426fecd14912fd0a546c58ec0
6 changes: 6 additions & 0 deletions trunk/drivers/media/video/v4l2-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ int v4l2_event_unsubscribe(struct v4l2_fh *fh,
{
struct v4l2_subscribed_event *sev;
unsigned long flags;
int i;

if (sub->type == V4L2_EVENT_ALL) {
v4l2_event_unsubscribe_all(fh);
Expand All @@ -295,6 +296,11 @@ int v4l2_event_unsubscribe(struct v4l2_fh *fh,

sev = v4l2_event_subscribed(fh, sub->type, sub->id);
if (sev != NULL) {
/* Remove any pending events for this subscription */
for (i = 0; i < sev->in_use; i++) {
list_del(&sev->events[sev_pos(sev, i)].list);
fh->navailable--;
}
list_del(&sev->list);
sev->fh = NULL;
}
Expand Down

0 comments on commit 59b9b03

Please sign in to comment.