Hello, On Monday, October 25, 2010 2:17 AM Pawel Osciak wrote: > On Tue, Oct 19, 2010 at 23:41, Marek Szyprowski > <m.szyprowski@xxxxxxxxxxx> wrote: > > From: Pawel Osciak <p.osciak@xxxxxxxxxxx> > > > +/** > > + * __vb2_queue_cancel() - cancel and stop (pause) streaming > > + * > > + * Removes all queued buffers from driver's queue and all buffers queued by > > + * userspace from videobuf's queue. Returns to state after reqbufs. > > + */ > > +static void __vb2_queue_cancel(struct vb2_queue *q) > > +{ > > + /* > > + * Tell driver to stop all dma transactions and release all queued > > + * buffers > > + */ > > Just being picky, but those doesn't neccesarily are "dma" transactions. Ok, I will change this comment. > > > + if (q->streaming && q->ops->stop_streaming) > > + q->ops->stop_streaming(q); > > + q->streaming = 0; > > + > > + /* > > + * Remove all buffers from videobuf's list... > > + */ > > + INIT_LIST_HEAD(&q->queued_list); > > + /* > > + * ...and done list; userspace will not receive any buffers it > > + * has not already dequeued before initiating cancel. > > + */ > > + INIT_LIST_HEAD(&q->done_list); > > + wake_up_all(&q->done_wq); > > Any reason for replacing wake_up_interruptible_all with wake_up_all? IMHO there is no reason to limit it to wake_up_interruptible_all. Initially I thought that the driver MIGHT want to implement stop_streaming() on top of this wait_queue, but later I abandoned this idea... Best regards -- Marek Szyprowski Samsung Poland R&D Center -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html