summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-04-04 15:36:02 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-04-17 00:14:17 +0200
commit30b23e261a3b02f548c834dee9d2e5cda0f1de32 (patch)
tree3fa681def26c65b9370fceac6a3d6724ab26c663
parentea119529c7ba3f042d227209c5669163916f6b4b (diff)
events: Stop dispatching events immediately when requested to stop
Otherwise events received but not yet dispatched are dispatched and can call hangs in ioctls as the pipeline has likely been stopped. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--events.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/events.c b/events.c
index da5e426..15d9535 100644
--- a/events.c
+++ b/events.c
@@ -126,6 +126,10 @@ static void events_dispatch(struct events *events, const fd_set *rfds,
if (event->type == OMAP3_ISP_EVENT_EXCEPTION &&
FD_ISSET(event->fd, efds))
event->callback(event->priv);
+
+ /* If the callback stopped events processing, we're done. */
+ if (events->done)
+ break;
}
}