mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-20 08:22:39 +00:00
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>
This commit is contained in:
parent
7948261942
commit
8bb629e22f
@ -1013,11 +1013,9 @@ struct video_device *cx88_vdev_init(struct cx88_core *core,
|
|||||||
struct cx88_core* cx88_core_get(struct pci_dev *pci)
|
struct cx88_core* cx88_core_get(struct pci_dev *pci)
|
||||||
{
|
{
|
||||||
struct cx88_core *core;
|
struct cx88_core *core;
|
||||||
struct list_head *item;
|
|
||||||
|
|
||||||
mutex_lock(&devlist);
|
mutex_lock(&devlist);
|
||||||
list_for_each(item,&cx88_devlist) {
|
list_for_each_entry(core, &cx88_devlist, devlist) {
|
||||||
core = list_entry(item, struct cx88_core, devlist);
|
|
||||||
if (pci->bus->number != core->pci_bus)
|
if (pci->bus->number != core->pci_bus)
|
||||||
continue;
|
continue;
|
||||||
if (PCI_SLOT(pci->devfn) != core->pci_slot)
|
if (PCI_SLOT(pci->devfn) != core->pci_slot)
|
||||||
|
@ -99,7 +99,6 @@ int cx8800_restart_vbi_queue(struct cx8800_dev *dev,
|
|||||||
struct cx88_dmaqueue *q)
|
struct cx88_dmaqueue *q)
|
||||||
{
|
{
|
||||||
struct cx88_buffer *buf;
|
struct cx88_buffer *buf;
|
||||||
struct list_head *item;
|
|
||||||
|
|
||||||
if (list_empty(&q->active))
|
if (list_empty(&q->active))
|
||||||
return 0;
|
return 0;
|
||||||
@ -108,10 +107,8 @@ int cx8800_restart_vbi_queue(struct cx8800_dev *dev,
|
|||||||
dprintk(2,"restart_queue [%p/%d]: restart dma\n",
|
dprintk(2,"restart_queue [%p/%d]: restart dma\n",
|
||||||
buf, buf->vb.i);
|
buf, buf->vb.i);
|
||||||
cx8800_start_vbi_dma(dev, q, buf);
|
cx8800_start_vbi_dma(dev, q, buf);
|
||||||
list_for_each(item,&q->active) {
|
list_for_each_entry(buf, &q->active, vb.queue)
|
||||||
buf = list_entry(item, struct cx88_buffer, vb.queue);
|
|
||||||
buf->count = q->count++;
|
buf->count = q->count++;
|
||||||
}
|
|
||||||
mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT);
|
mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -466,17 +466,14 @@ static int restart_video_queue(struct cx8800_dev *dev,
|
|||||||
{
|
{
|
||||||
struct cx88_core *core = dev->core;
|
struct cx88_core *core = dev->core;
|
||||||
struct cx88_buffer *buf, *prev;
|
struct cx88_buffer *buf, *prev;
|
||||||
struct list_head *item;
|
|
||||||
|
|
||||||
if (!list_empty(&q->active)) {
|
if (!list_empty(&q->active)) {
|
||||||
buf = list_entry(q->active.next, struct cx88_buffer, vb.queue);
|
buf = list_entry(q->active.next, struct cx88_buffer, vb.queue);
|
||||||
dprintk(2,"restart_queue [%p/%d]: restart dma\n",
|
dprintk(2,"restart_queue [%p/%d]: restart dma\n",
|
||||||
buf, buf->vb.i);
|
buf, buf->vb.i);
|
||||||
start_video_dma(dev, q, buf);
|
start_video_dma(dev, q, buf);
|
||||||
list_for_each(item,&q->active) {
|
list_for_each_entry(buf, &q->active, vb.queue)
|
||||||
buf = list_entry(item, struct cx88_buffer, vb.queue);
|
buf->count = q->count++;
|
||||||
buf->count = q->count++;
|
|
||||||
}
|
|
||||||
mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT);
|
mod_timer(&q->timeout, jiffies+BUFFER_TIMEOUT);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -713,12 +710,10 @@ static int video_open(struct inode *inode, struct file *file)
|
|||||||
struct cx8800_dev *h,*dev = NULL;
|
struct cx8800_dev *h,*dev = NULL;
|
||||||
struct cx88_core *core;
|
struct cx88_core *core;
|
||||||
struct cx8800_fh *fh;
|
struct cx8800_fh *fh;
|
||||||
struct list_head *list;
|
|
||||||
enum v4l2_buf_type type = 0;
|
enum v4l2_buf_type type = 0;
|
||||||
int radio = 0;
|
int radio = 0;
|
||||||
|
|
||||||
list_for_each(list,&cx8800_devlist) {
|
list_for_each_entry(h, &cx8800_devlist, devlist) {
|
||||||
h = list_entry(list, struct cx8800_dev, devlist);
|
|
||||||
if (h->video_dev->minor == minor) {
|
if (h->video_dev->minor == minor) {
|
||||||
dev = h;
|
dev = h;
|
||||||
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||||
|
Loading…
Reference in New Issue
Block a user