aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-10-10 04:37:43 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-10 12:35:29 -0400
commita991f44b79fa49b281eb078eed4a76a42101012a (patch)
tree5a6b7a4ce700ef8bcdf59f816c0c04b5e64d215b /drivers/media/video/em28xx
parente77e2c2f2989eefff7e1c0fff9cb72afaedf6796 (diff)
V4L/DVB (6316): Change list_for_each+list_entry to list_for_each_entry
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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index e4fba9068336..b8d5327c438d 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -252,10 +252,8 @@ static int em28xx_v4l2_open(struct inode *inode, struct file *filp)
252 int minor = iminor(inode); 252 int minor = iminor(inode);
253 int errCode = 0; 253 int errCode = 0;
254 struct em28xx *h,*dev = NULL; 254 struct em28xx *h,*dev = NULL;
255 struct list_head *list;
256 255
257 list_for_each(list,&em28xx_devlist) { 256 list_for_each_entry(h, &em28xx_devlist, devlist) {
258 h = list_entry(list, struct em28xx, devlist);
259 if (h->vdev->minor == minor) { 257 if (h->vdev->minor == minor) {
260 dev = h; 258 dev = h;
261 dev->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 259 dev->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;