linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for v4.8] cx23885/saa7134: assign q->dev to the PCI device
@ 2016-09-18 14:24 Hans Verkuil
  2016-09-19 19:33 ` Marton Balint
  0 siblings, 1 reply; 2+ messages in thread
From: Hans Verkuil @ 2016-09-18 14:24 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Marton Balint

Fix a regression caused by commit 2bc46b3a (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.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Marton Balint <cus@passwd.hu>
---
diff --git a/drivers/media/pci/cx23885/cx23885-417.c b/drivers/media/pci/cx23885/cx23885-417.c
index efec2d1..4d080da 100644
--- a/drivers/media/pci/cx23885/cx23885-417.c
+++ b/drivers/media/pci/cx23885/cx23885-417.c
@@ -1552,6 +1552,7 @@ int cx23885_417_register(struct cx23885_dev *dev)
 	q->mem_ops = &vb2_dma_sg_memops;
 	q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
 	q->lock = &dev->lock;
+	q->dev = &dev->pci->dev;

 	err = vb2_queue_init(q);
 	if (err < 0)
diff --git a/drivers/media/pci/saa7134/saa7134-dvb.c b/drivers/media/pci/saa7134/saa7134-dvb.c
index db987e5..59a4b5f 100644
--- a/drivers/media/pci/saa7134/saa7134-dvb.c
+++ b/drivers/media/pci/saa7134/saa7134-dvb.c
@@ -1238,6 +1238,7 @@ static int dvb_init(struct saa7134_dev *dev)
 	q->buf_struct_size = sizeof(struct saa7134_buf);
 	q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
 	q->lock = &dev->lock;
+	q->dev = &dev->pci->dev;
 	ret = vb2_queue_init(q);
 	if (ret) {
 		vb2_dvb_dealloc_frontends(&dev->frontends);
diff --git a/drivers/media/pci/saa7134/saa7134-empress.c b/drivers/media/pci/saa7134/saa7134-empress.c
index ca417a4..791a516 100644
--- a/drivers/media/pci/saa7134/saa7134-empress.c
+++ b/drivers/media/pci/saa7134/saa7134-empress.c
@@ -295,6 +295,7 @@ static int empress_init(struct saa7134_dev *dev)
 	q->buf_struct_size = sizeof(struct saa7134_buf);
 	q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
 	q->lock = &dev->lock;
+	q->dev = &dev->pci->dev;
 	err = vb2_queue_init(q);
 	if (err)
 		return err;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH for v4.8] cx23885/saa7134: assign q->dev to the PCI device
  2016-09-18 14:24 [PATCH for v4.8] cx23885/saa7134: assign q->dev to the PCI device Hans Verkuil
@ 2016-09-19 19:33 ` Marton Balint
  0 siblings, 0 replies; 2+ messages in thread
From: Marton Balint @ 2016-09-19 19:33 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Linux Media Mailing List


On Sun, 18 Sep 2016, Hans Verkuil wrote:

> Fix a regression caused by commit 2bc46b3a (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.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Reported-by: Marton Balint <cus@passwd.hu>
> ---

Tested-by: Marton Balint <cus@passwd.hu>

Thanks, the patch indeed fixes the WARN, and dvbstream is now working 
properly.

Regards,
Marton

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-19 19:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-18 14:24 [PATCH for v4.8] cx23885/saa7134: assign q->dev to the PCI device Hans Verkuil
2016-09-19 19:33 ` Marton Balint

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).