[media] cx23885/saa7134: assign q->dev to the PCI device

Fix a regression caused by commit 2bc46b3ad3 ("[media] media/pci:
convert drivers to use the new vb2_queue dev field").

Three places where q->dev should be set were missed, causing
a WARN.

Fixes: 2bc46b3ad3 ("[media] media/pci: convert drivers to use the new vb2_queue dev field").

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Hans Verkuil 2016-09-18 11:24:50 -03:00 коммит произвёл Mauro Carvalho Chehab
Родитель 7892a1f64a
Коммит d8feef9bd4
3 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -1552,6 +1552,7 @@ int cx23885_417_register(struct cx23885_dev *dev)
q->mem_ops = &vb2_dma_sg_memops; q->mem_ops = &vb2_dma_sg_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
q->lock = &dev->lock; q->lock = &dev->lock;
q->dev = &dev->pci->dev;
err = vb2_queue_init(q); err = vb2_queue_init(q);
if (err < 0) if (err < 0)

Просмотреть файл

@ -1238,6 +1238,7 @@ static int dvb_init(struct saa7134_dev *dev)
q->buf_struct_size = sizeof(struct saa7134_buf); q->buf_struct_size = sizeof(struct saa7134_buf);
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
q->lock = &dev->lock; q->lock = &dev->lock;
q->dev = &dev->pci->dev;
ret = vb2_queue_init(q); ret = vb2_queue_init(q);
if (ret) { if (ret) {
vb2_dvb_dealloc_frontends(&dev->frontends); vb2_dvb_dealloc_frontends(&dev->frontends);

Просмотреть файл

@ -295,6 +295,7 @@ static int empress_init(struct saa7134_dev *dev)
q->buf_struct_size = sizeof(struct saa7134_buf); q->buf_struct_size = sizeof(struct saa7134_buf);
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
q->lock = &dev->lock; q->lock = &dev->lock;
q->dev = &dev->pci->dev;
err = vb2_queue_init(q); err = vb2_queue_init(q);
if (err) if (err)
return err; return err;