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/dpc7146.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/dpc7146.c')
-rw-r--r-- | drivers/media/video/dpc7146.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/video/dpc7146.c b/drivers/media/video/dpc7146.c index 0fcc935828f8..255dae303708 100644 --- a/drivers/media/video/dpc7146.c +++ b/drivers/media/video/dpc7146.c | |||
@@ -92,7 +92,6 @@ static int dpc_probe(struct saa7146_dev* dev) | |||
92 | { | 92 | { |
93 | struct dpc* dpc = NULL; | 93 | struct dpc* dpc = NULL; |
94 | struct i2c_client *client; | 94 | struct i2c_client *client; |
95 | struct list_head *item; | ||
96 | 95 | ||
97 | dpc = kzalloc(sizeof(struct dpc), GFP_KERNEL); | 96 | dpc = kzalloc(sizeof(struct dpc), GFP_KERNEL); |
98 | if( NULL == dpc ) { | 97 | if( NULL == dpc ) { |
@@ -116,11 +115,9 @@ static int dpc_probe(struct saa7146_dev* dev) | |||
116 | } | 115 | } |
117 | 116 | ||
118 | /* loop through all i2c-devices on the bus and look who is there */ | 117 | /* loop through all i2c-devices on the bus and look who is there */ |
119 | list_for_each(item,&dpc->i2c_adapter.clients) { | 118 | list_for_each_entry(client, &dpc->i2c_adapter.clients, list) |
120 | client = list_entry(item, struct i2c_client, list); | ||
121 | if( I2C_SAA7111A == client->addr ) | 119 | if( I2C_SAA7111A == client->addr ) |
122 | dpc->saa7111a = client; | 120 | dpc->saa7111a = client; |
123 | } | ||
124 | 121 | ||
125 | /* check if all devices are present */ | 122 | /* check if all devices are present */ |
126 | if( 0 == dpc->saa7111a ) { | 123 | if( 0 == dpc->saa7111a ) { |