From fe31bcb9f3e7705804f813000ab9fdc74b64754e Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Wed, 10 Oct 2007 01:37:43 -0700 Subject: Change list_for_each+list_entry to list_for_each_entry From: Trent Piepho 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 --- linux/drivers/media/video/mxb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'linux/drivers/media/video/mxb.c') diff --git a/linux/drivers/media/video/mxb.c b/linux/drivers/media/video/mxb.c index 0ed5c1e47..6847f8c93 100644 --- a/linux/drivers/media/video/mxb.c +++ b/linux/drivers/media/video/mxb.c @@ -154,7 +154,6 @@ static int mxb_probe(struct saa7146_dev* dev) { struct mxb* mxb = NULL; struct i2c_client *client; - struct list_head *item; int result; if ((result = request_module("saa7111")) < 0) { @@ -197,8 +196,7 @@ static int mxb_probe(struct saa7146_dev* dev) } /* loop through all i2c-devices on the bus and look who is there */ - list_for_each(item,&mxb->i2c_adapter.clients) { - client = list_entry(item, struct i2c_client, list); + list_for_each_entry(client, &mxb->i2c_adapter.clients, list) { if( I2C_ADDR_TEA6420_1 == client->addr ) mxb->tea6420_1 = client; if( I2C_ADDR_TEA6420_2 == client->addr ) -- cgit v1.2.3