diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-10-10 01:37:43 -0700 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2007-10-10 01:37:43 -0700 |
commit | fe31bcb9f3e7705804f813000ab9fdc74b64754e (patch) | |
tree | 6dbdbae0e433202f35a0cac4af6221f628b1af30 /linux/drivers/media/video/videobuf-core.c | |
parent | aa956009652213ab93e09e11d1892afbf2aefd18 (diff) | |
download | mediapointer-dvb-s2-fe31bcb9f3e7705804f813000ab9fdc74b64754e.tar.gz mediapointer-dvb-s2-fe31bcb9f3e7705804f813000ab9fdc74b64754e.tar.bz2 |
Change list_for_each+list_entry to list_for_each_entry
From: Trent Piepho <xyzzy@speakeasy.org>
The rest of V4L files.
There is one list_for_each+list_entry in cpia_pp.c that
wasn't changed because it expects the loop iterator to remain NULL if
the list is empty.
A bug in vivi is fixed; the 'safe' version needs to be used because the loop
deletes the list entries.
Simplify a second loop in vivi and get rid if an un-used variable in that loop.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers/media/video/videobuf-core.c')
-rw-r--r-- | linux/drivers/media/video/videobuf-core.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/linux/drivers/media/video/videobuf-core.c b/linux/drivers/media/video/videobuf-core.c index d7234d626..8b79d218d 100644 --- a/linux/drivers/media/video/videobuf-core.c +++ b/linux/drivers/media/video/videobuf-core.c @@ -518,7 +518,6 @@ int videobuf_dqbuf(struct videobuf_queue *q, int videobuf_streamon(struct videobuf_queue *q) { struct videobuf_buffer *buf; - struct list_head *list; unsigned long flags=0; int retval; @@ -532,11 +531,9 @@ int videobuf_streamon(struct videobuf_queue *q) q->streaming = 1; if (q->irqlock) spin_lock_irqsave(q->irqlock,flags); - list_for_each(list,&q->stream) { - buf = list_entry(list, struct videobuf_buffer, stream); + list_for_each_entry(buf, &q->stream, stream) if (buf->state == STATE_PREPARED) q->ops->buf_queue(q,buf); - } if (q->irqlock) spin_unlock_irqrestore(q->irqlock,flags); |