diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-10-10 04:37:43 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-10 12:35:29 -0400 |
commit | a991f44b79fa49b281eb078eed4a76a42101012a (patch) | |
tree | 5a6b7a4ce700ef8bcdf59f816c0c04b5e64d215b /drivers/media/video/v4l2-int-device.c | |
parent | e77e2c2f2989eefff7e1c0fff9cb72afaedf6796 (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/v4l2-int-device.c')
-rw-r--r-- | drivers/media/video/v4l2-int-device.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/media/video/v4l2-int-device.c b/drivers/media/video/v4l2-int-device.c index f497c945834..8b4ef530a3a 100644 --- a/drivers/media/video/v4l2-int-device.c +++ b/drivers/media/video/v4l2-int-device.c | |||
@@ -34,21 +34,13 @@ static LIST_HEAD(int_list); | |||
34 | 34 | ||
35 | static void v4l2_int_device_try_attach_all(void) | 35 | static void v4l2_int_device_try_attach_all(void) |
36 | { | 36 | { |
37 | struct list_head *head_master; | 37 | struct v4l2_int_device *m, *s; |
38 | |||
39 | list_for_each(head_master, &int_list) { | ||
40 | struct list_head *head_slave; | ||
41 | struct v4l2_int_device *m = | ||
42 | list_entry(head_master, struct v4l2_int_device, head); | ||
43 | 38 | ||
39 | list_for_each_entry(m, &int_list, head) { | ||
44 | if (m->type != v4l2_int_type_master) | 40 | if (m->type != v4l2_int_type_master) |
45 | continue; | 41 | continue; |
46 | 42 | ||
47 | list_for_each(head_slave, &int_list) { | 43 | list_for_each_entry(s, &int_list, head) { |
48 | struct v4l2_int_device *s = | ||
49 | list_entry(head_slave, | ||
50 | struct v4l2_int_device, head); | ||
51 | |||
52 | if (s->type != v4l2_int_type_slave) | 44 | if (s->type != v4l2_int_type_slave) |
53 | continue; | 45 | continue; |
54 | 46 | ||