Commit d8feef9b authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

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

Fix a regression caused by commit 2bc46b3a ("[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: 2bc46b3a ("[media] media/pci: convert drivers to use the new vb2_queue dev field").
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Reported-by: default avatarMarton Balint <cus@passwd.hu>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 7892a1f6
...@@ -1552,6 +1552,7 @@ int cx23885_417_register(struct cx23885_dev *dev) ...@@ -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) ...@@ -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) ...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment