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/tvmixer.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'linux/drivers/media/video/tvmixer.c') diff --git a/linux/drivers/media/video/tvmixer.c b/linux/drivers/media/video/tvmixer.c index 7137b1ee3..ca7330e10 100644 --- a/linux/drivers/media/video/tvmixer.c +++ b/linux/drivers/media/video/tvmixer.c @@ -270,13 +270,10 @@ static const struct file_operations tvmixer_fops = { static int tvmixer_adapters(struct i2c_adapter *adap) { #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,54) - struct list_head *item; struct i2c_client *client; - list_for_each(item,&adap->clients) { - client = list_entry(item, struct i2c_client, list); + list_for_each_entry(client, &adap->clients, list) tvmixer_clients(client); - } #else int i; -- cgit v1.2.3