diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-10-10 04:37:40 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-10 12:34:48 -0400 |
commit | 8bb629e22f2547736c24fe4738673e20cc06d469 (patch) | |
tree | feb7d8db7ce8d35f3f278dddce48d4ee0cd12d29 /drivers/media/video/cx88 | |
parent | 7948261942ffdb35e274b8e1a0889601f45d4603 (diff) |
V4L/DVB (6312): cx88: Replace list_for_each+list_entry with list_for_each_entry
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r-- | drivers/media/video/cx88/cx88-core.c | 4 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-vbi.c | 5 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-video.c | 11 |
3 files changed, 5 insertions, 15 deletions
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c index 85609b41f86e..62e8dd24c5f5 100644 --- a/drivers/media/video/cx88/cx88-core.c +++ b/drivers/media/video/cx88/cx88-core.c | |||
@@ -1013,11 +1013,9 @@ struct video_device *cx88_vdev_init(struct cx88_core *core, | |||
1013 | struct cx88_core* cx88_core_get(struct pci_dev *pci) | 1013 | struct cx88_core* cx88_core_get(struct pci_dev *pci) |
1014 | { | 1014 | { |
1015 | struct cx88_core *core; | 1015 | struct cx88_core *core; |
1016 | struct list_head *item; | ||
1017 | 1016 | ||
1018 | mutex_lock(&devlist); | 1017 | mutex_lock(&devlist); |
1019 | list_for_each(item,&cx88_devlist) { | 1018 | list_for_each_entry(core, &cx88_devlist, devlist) { |
1020 | core = list_entry(item, struct cx88_core, devlist); | ||
1021 | if (pci->bus->number != core->pci_bus) | 1019 | if (pci->bus->number != core->pci_bus) |
1022 | continue; | 1020 | continue; |
1023 | if (PCI_SLOT(pci->devfn) != core->pci_slot) | 1021 | if (PCI_SLOT(pci->devfn) != core->pci_slot) |
diff --git a/drivers/media/video/cx88/cx88-vbi.c b/drivers/media/video/cx88/cx88-vbi.c index aa40505c4b3a..babb08556406 100644 --- a/drivers/media/video/cx88/cx88-vbi.c +++ b/drivers/media/video/cx88/cx88-vbi.c | |||
@@ -99,7 +99,6 @@ int cx8800_restart_vbi_queue(struct cx8800_dev *dev, | |||
99 | struct cx88_dmaqueue *q) | 99 | struct cx88_dmaqueue *q) |
100 | { | 100 | { |
101 | struct cx88_buffer *buf; | 101 | struct cx88_buffer *buf; |
102 | struct list_head *item; | ||
103 | 102 | ||
104 | if (list_empty(&q->active)) | 103 | if (list_empty(&q->active)) |
105 | return 0; | 104 | return 0; |
@@ -108,10 +107,8 @@ int cx8800_restart_vbi_queue(struct cx8800_dev *dev, | |||
108 | dprintk(2,"restart_queue [%p/%d]: restart dma\n", | 107 | dprintk(2,"restart_queue [%p/%d]: restart dma\n", |
109 | buf, buf->vb.i); | 108 | buf, buf->vb.i); |
110 | cx8800_start_vbi_dma(dev, q, buf); | 109 | cx8800_start_vbi_dma(dev, q, buf); |
111 | list_for_each(item,&q->active) { | 110 | list_for_each_entry(buf, &q->active, vb.queue) |
112 | buf = list_entry(item, struct cx88_buffer, vb.queue); | ||
113 | buf->count = q->count++; | 111 | buf->count = q->count++; |
114 | } | ||
115 | mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT); | 112 | mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT); |
116 | return 0; | 113 | return 0; |
117 | } | 114 | } |
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 1439b7268532..231ae6c4dd22 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -466,17 +466,14 @@ static int restart_video_queue(struct cx8800_dev *dev, | |||
466 | { | 466 | { |
467 | struct cx88_core *core = dev->core; | 467 | struct cx88_core *core = dev->core; |
468 | struct cx88_buffer *buf, *prev; | 468 | struct cx88_buffer *buf, *prev; |
469 | struct list_head *item; | ||
470 | 469 | ||
471 | if (!list_empty(&q->active)) { | 470 | if (!list_empty(&q->active)) { |
472 | buf = list_entry(q->active.next, struct cx88_buffer, vb.queue); | 471 | buf = list_entry(q->active.next, struct cx88_buffer, vb.queue); |
473 | dprintk(2,"restart_queue [%p/%d]: restart dma\n", | 472 | dprintk(2,"restart_queue [%p/%d]: restart dma\n", |
474 | buf, buf->vb.i); | 473 | buf, buf->vb.i); |
475 | start_video_dma(dev, q, buf); | 474 | start_video_dma(dev, q, buf); |
476 | list_for_each(item,&q->active) { | 475 | list_for_each_entry(buf, &q->active, vb.queue) |
477 | buf = list_entry(item, struct cx88_buffer, vb.queue); | 476 | buf->count = q->count++; |
478 | buf->count = q->count++; | ||
479 | } | ||
480 | mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT); | 477 | mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT); |
481 | return 0; | 478 | return 0; |
482 | } | 479 | } |
@@ -713,12 +710,10 @@ static int video_open(struct inode *inode, struct file *file) | |||
713 | struct cx8800_dev *h,*dev = NULL; | 710 | struct cx8800_dev *h,*dev = NULL; |
714 | struct cx88_core *core; | 711 | struct cx88_core *core; |
715 | struct cx8800_fh *fh; | 712 | struct cx8800_fh *fh; |
716 | struct list_head *list; | ||
717 | enum v4l2_buf_type type = 0; | 713 | enum v4l2_buf_type type = 0; |
718 | int radio = 0; | 714 | int radio = 0; |
719 | 715 | ||
720 | list_for_each(list,&cx8800_devlist) { | 716 | list_for_each_entry(h, &cx8800_devlist, devlist) { |
721 | h = list_entry(list, struct cx8800_dev, devlist); | ||
722 | if (h->video_dev->minor == minor) { | 717 | if (h->video_dev->minor == minor) { |
723 | dev = h; | 718 | dev = h; |
724 | type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | 719 | type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |