diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-10-10 01:37:43 -0700 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2007-10-10 01:37:43 -0700 |
commit | fe31bcb9f3e7705804f813000ab9fdc74b64754e (patch) | |
tree | 6dbdbae0e433202f35a0cac4af6221f628b1af30 /linux/drivers/media/video/bt8xx/bttv-gpio.c | |
parent | aa956009652213ab93e09e11d1892afbf2aefd18 (diff) | |
download | mediapointer-dvb-s2-fe31bcb9f3e7705804f813000ab9fdc74b64754e.tar.gz mediapointer-dvb-s2-fe31bcb9f3e7705804f813000ab9fdc74b64754e.tar.bz2 |
Change list_for_each+list_entry to list_for_each_entry
From: Trent Piepho <xyzzy@speakeasy.org>
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>
Diffstat (limited to 'linux/drivers/media/video/bt8xx/bttv-gpio.c')
-rw-r--r-- | linux/drivers/media/video/bt8xx/bttv-gpio.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/linux/drivers/media/video/bt8xx/bttv-gpio.c b/linux/drivers/media/video/bt8xx/bttv-gpio.c index 1f31495f6..9b161b8dd 100644 --- a/linux/drivers/media/video/bt8xx/bttv-gpio.c +++ b/linux/drivers/media/video/bt8xx/bttv-gpio.c @@ -113,11 +113,9 @@ int bttv_sub_add_device(struct bttv_core *core, char *name) int bttv_sub_del_devices(struct bttv_core *core) { - struct bttv_sub_device *sub; - struct list_head *item,*save; + struct bttv_sub_device *sub, *save; - list_for_each_safe(item,save,&core->subs) { - sub = list_entry(item,struct bttv_sub_device,list); + list_for_each_entry_safe(sub, save, &core->subs, list) { list_del(&sub->list); device_unregister(&sub->dev); } |