From a991f44b79fa49b281eb078eed4a76a42101012a Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Wed, 10 Oct 2007 05:37:43 -0300 Subject: 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/dpc7146.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers/media/video/dpc7146.c') diff --git a/drivers/media/video/dpc7146.c b/drivers/media/video/dpc7146.c index 0fcc935..255dae3 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) { struct dpc* dpc = NULL; struct i2c_client *client; - struct list_head *item; dpc = kzalloc(sizeof(struct dpc), GFP_KERNEL); if( NULL == dpc ) { @@ -116,11 +115,9 @@ static int dpc_probe(struct saa7146_dev* dev) } /* loop through all i2c-devices on the bus and look who is there */ - list_for_each(item,&dpc->i2c_adapter.clients) { - client = list_entry(item, struct i2c_client, list); + list_for_each_entry(client, &dpc->i2c_adapter.clients, list) if( I2C_SAA7111A == client->addr ) dpc->saa7111a = client; - } /* check if all devices are present */ if( 0 == dpc->saa7111a ) { -- cgit v1.1