Patchwork [maverick,v2] UBUNTU: SAUCE: cx23885: Fix argument to videobuf_dma_unmap

login
register
mail settings
Submitter Jeremy Kerr
Date June 22, 2011, 7:46 a.m.
Message ID <1308728775.775437.222234189762.1.gpush@pororo>
Download mbox | patch
Permalink /patch/101401/
State New
Headers show

Comments

Jeremy Kerr - June 22, 2011, 7:46 a.m.
BugLink: https://bugs.launchpad.net/bugs/800527

The commit bcbfc24 introduced a change to cx23885-core.c that is
incorrect - the videobuf_dma_unmap function accepts a struct videobuf *,
and bcbfc24 changed this to a struct device *.

[The videobuf_dma_unmap API has been changed, but that new API is not in
maverick]

This change reverts the call to use the correct struct videobuf *.

Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>

---
v2: fix buglink & clarify title

---
 drivers/media/video/cx23885/cx23885-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Stefan Bader - June 22, 2011, 7:52 a.m.
On 22.06.2011 09:46, Jeremy Kerr wrote:
> BugLink: https://bugs.launchpad.net/bugs/800527
> 
> The commit bcbfc24 introduced a change to cx23885-core.c that is
> incorrect - the videobuf_dma_unmap function accepts a struct videobuf *,
> and bcbfc24 changed this to a struct device *.
> 
> [The videobuf_dma_unmap API has been changed, but that new API is not in
> maverick]
> 
> This change reverts the call to use the correct struct videobuf *.
> 
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> 
> ---
> v2: fix buglink & clarify title
> 
> ---
>  drivers/media/video/cx23885/cx23885-core.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c
> index 7e897de..b3568df 100644
> --- a/drivers/media/video/cx23885/cx23885-core.c
> +++ b/drivers/media/video/cx23885/cx23885-core.c
> @@ -1143,7 +1143,7 @@ void cx23885_free_buffer(struct videobuf_queue *q, struct cx23885_buffer *buf)
>  
>  	BUG_ON(in_interrupt());
>  	videobuf_waiton(&buf->vb, 0, 0);
> -	videobuf_dma_unmap(q->dev, dma);
> +	videobuf_dma_unmap(q, dma);
>  	videobuf_dma_free(dma);
>  	btcx_riscmem_free(to_pci_dev(q->dev), &buf->risc);
>  	buf->vb.state = VIDEOBUF_NEEDS_INIT;
> 
Patch looks good. And since this came through a sauce patch only us is affected.

Acked-by: Stefan Bader <stefan.bader@canonical.com>
Andy Whitcroft - June 22, 2011, 8:40 a.m.
On Wed, Jun 22, 2011 at 03:46:15PM +0800, Jeremy Kerr wrote:
> BugLink: https://bugs.launchpad.net/bugs/800527
> 
> The commit bcbfc24 introduced a change to cx23885-core.c that is
> incorrect - the videobuf_dma_unmap function accepts a struct videobuf *,
> and bcbfc24 changed this to a struct device *.
> 
> [The videobuf_dma_unmap API has been changed, but that new API is not in
> maverick]
> 
> This change reverts the call to use the correct struct videobuf *.
> 
> Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
> 
> ---
> v2: fix buglink & clarify title
> 
> ---
>  drivers/media/video/cx23885/cx23885-core.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c
> index 7e897de..b3568df 100644
> --- a/drivers/media/video/cx23885/cx23885-core.c
> +++ b/drivers/media/video/cx23885/cx23885-core.c
> @@ -1143,7 +1143,7 @@ void cx23885_free_buffer(struct videobuf_queue *q, struct cx23885_buffer *buf)
>  
>  	BUG_ON(in_interrupt());
>  	videobuf_waiton(&buf->vb, 0, 0);
> -	videobuf_dma_unmap(q->dev, dma);
> +	videobuf_dma_unmap(q, dma);
>  	videobuf_dma_free(dma);
>  	btcx_riscmem_free(to_pci_dev(q->dev), &buf->risc);
>  	buf->vb.state = VIDEOBUF_NEEDS_INIT;

Confirmed, maverick videobuf_dma_unmap() takes a videobuf * so this
change was inappropriate.

Acked-by: Andy Whitcroft <apw@canonical.com>

-apw
Tim Gardner - June 22, 2011, 12:34 p.m.
On 06/22/2011 01:46 AM, Jeremy Kerr wrote:
> BugLink: https://bugs.launchpad.net/bugs/800527
>
> The commit bcbfc24 introduced a change to cx23885-core.c that is
> incorrect - the videobuf_dma_unmap function accepts a struct videobuf *,
> and bcbfc24 changed this to a struct device *.
>
> [The videobuf_dma_unmap API has been changed, but that new API is not in
> maverick]
>
> This change reverts the call to use the correct struct videobuf *.
>
> Signed-off-by: Jeremy Kerr<jeremy.kerr@canonical.com>
>
> ---
> v2: fix buglink&  clarify title
>
> ---
>   drivers/media/video/cx23885/cx23885-core.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c
> index 7e897de..b3568df 100644
> --- a/drivers/media/video/cx23885/cx23885-core.c
> +++ b/drivers/media/video/cx23885/cx23885-core.c
> @@ -1143,7 +1143,7 @@ void cx23885_free_buffer(struct videobuf_queue *q, struct cx23885_buffer *buf)
>
>   	BUG_ON(in_interrupt());
>   	videobuf_waiton(&buf->vb, 0, 0);
> -	videobuf_dma_unmap(q->dev, dma);
> +	videobuf_dma_unmap(q, dma);
>   	videobuf_dma_free(dma);
>   	btcx_riscmem_free(to_pci_dev(q->dev),&buf->risc);
>   	buf->vb.state = VIDEOBUF_NEEDS_INIT;
>

Patch

diff --git a/drivers/media/video/cx23885/cx23885-core.c b/drivers/media/video/cx23885/cx23885-core.c
index 7e897de..b3568df 100644
--- a/drivers/media/video/cx23885/cx23885-core.c
+++ b/drivers/media/video/cx23885/cx23885-core.c
@@ -1143,7 +1143,7 @@  void cx23885_free_buffer(struct videobuf_queue *q, struct cx23885_buffer *buf)
 
 	BUG_ON(in_interrupt());
 	videobuf_waiton(&buf->vb, 0, 0);
-	videobuf_dma_unmap(q->dev, dma);
+	videobuf_dma_unmap(q, dma);
 	videobuf_dma_free(dma);
 	btcx_riscmem_free(to_pci_dev(q->dev), &buf->risc);
 	buf->vb.state = VIDEOBUF_NEEDS_INIT;