linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: v4l-dvb tree build failure
@ 2009-04-07  0:58 Stephen Rothwell
  2009-04-07  1:20 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2009-04-07  0:58 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, Hans Verkuil

[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]

Hi Mauro,

Today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/media/video/v4l2-common.c: In function 'v4l2_i2c_new_probed_subdev_addr':
drivers/media/video/v4l2-common.c:874: warning: passing argument 1 of 'v4l2_i2c_new_probed_subdev' from incompatible pointer type
drivers/media/video/v4l2-common.c:874: warning: passing argument 2 of 'v4l2_i2c_new_probed_subdev' from incompatible pointer type
drivers/media/video/v4l2-common.c:874: warning: passing argument 4 of 'v4l2_i2c_new_probed_subdev' from incompatible pointer type
drivers/media/video/v4l2-common.c:874: error: too many arguments to function 'v4l2_i2c_new_probed_subdev'

Caused by commit b97a45dfbd99a414a1af8e7224ab12d6ccbe3789 ("V4L/DVB
(11374): v4l2-common: add v4l2_i2c_new_probed_subdev_addr").

This was clearly never even built ...

I have used the v4l-dvb tree fomr next-20090406 for today.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2009-04-07  0:58 linux-next: v4l-dvb tree build failure Stephen Rothwell
@ 2009-04-07  1:20 ` Mauro Carvalho Chehab
  2009-04-07  4:47   ` Stephen Rothwell
  0 siblings, 1 reply; 41+ messages in thread
From: Mauro Carvalho Chehab @ 2009-04-07  1:20 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, Hans Verkuil

On Tue, 7 Apr 2009 10:58:32 +1000
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Mauro,
> 
> Today's linux-next build (x86_64 allmodconfig) failed like this:
> 
> drivers/media/video/v4l2-common.c: In function 'v4l2_i2c_new_probed_subdev_addr':
> drivers/media/video/v4l2-common.c:874: warning: passing argument 1 of 'v4l2_i2c_new_probed_subdev' from incompatible pointer type
> drivers/media/video/v4l2-common.c:874: warning: passing argument 2 of 'v4l2_i2c_new_probed_subdev' from incompatible pointer type
> drivers/media/video/v4l2-common.c:874: warning: passing argument 4 of 'v4l2_i2c_new_probed_subdev' from incompatible pointer type
> drivers/media/video/v4l2-common.c:874: error: too many arguments to function 'v4l2_i2c_new_probed_subdev'
> 
> Caused by commit b97a45dfbd99a414a1af8e7224ab12d6ccbe3789 ("V4L/DVB
> (11374): v4l2-common: add v4l2_i2c_new_probed_subdev_addr").
> 
> This was clearly never even built ...
> 
> I have used the v4l-dvb tree fomr next-20090406 for today.
> 

I suspect that you've pulled from my tree a few hours ago, before I fix a merge
conflict. This were already fixed. 

The only compilation messages I'm getting here are a few warnings about
the usage of the deprecated i2c API:

drivers/media/video/ir-kbd-i2c.c: In function ‘ir_attach’:
drivers/media/video/ir-kbd-i2c.c:420: warning: ‘i2c_attach_client’ is deprecated (declared at include/linux/i2c.h:434)
drivers/media/video/ir-kbd-i2c.c:455: warning: ‘i2c_detach_client’ is deprecated (declared at include/linux/i2c.h:435)
drivers/media/video/ir-kbd-i2c.c: In function ‘ir_detach’:
drivers/media/video/ir-kbd-i2c.c:471: warning: ‘i2c_detach_client’ is deprecated (declared at include/linux/i2c.h:435)

Cheers,
Mauro

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

* Re: linux-next: v4l-dvb tree build failure
  2009-04-07  1:20 ` Mauro Carvalho Chehab
@ 2009-04-07  4:47   ` Stephen Rothwell
  0 siblings, 0 replies; 41+ messages in thread
From: Stephen Rothwell @ 2009-04-07  4:47 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, Hans Verkuil

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

Hi Mauro,

On Mon, 6 Apr 2009 22:20:55 -0300 Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
>
> I suspect that you've pulled from my tree a few hours ago, before I fix a merge
> conflict. This were already fixed. 

Indeed.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2010-01-28  1:54   ` Mauro Carvalho Chehab
@ 2010-01-28  5:24     ` Stephen Rothwell
  0 siblings, 0 replies; 41+ messages in thread
From: Stephen Rothwell @ 2010-01-28  5:24 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Andy Walls, linux-next, linux-kernel, Devin Heitmueller

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

Hi Mauro, Andy,

On Wed, 27 Jan 2010 23:54:12 -0200 Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
>
> Andy Walls wrote:
> > Looks good to me.
> > 
> > Acked-by: Andy Walls <awalls@radix.net>
> 
> Added at the tree.

Thanks guys.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2010-01-27 23:24 ` Andy Walls
@ 2010-01-28  1:54   ` Mauro Carvalho Chehab
  2010-01-28  5:24     ` Stephen Rothwell
  0 siblings, 1 reply; 41+ messages in thread
From: Mauro Carvalho Chehab @ 2010-01-28  1:54 UTC (permalink / raw)
  To: Andy Walls; +Cc: Stephen Rothwell, linux-next, linux-kernel, Devin Heitmueller

Andy Walls wrote:
> On Wed, 2010-01-27 at 17:59 +1100, Stephen Rothwell wrote:
>> Hi Mauro,
>>
>> Today's linux-next build (powerpc allyesconfig) failed like this:
>>
>> drivers/media/video/cx18/cx18-alsa-pcm.c: In function 'snd_pcm_alloc_vmalloc_buffer':
>> drivers/media/video/cx18/cx18-alsa-pcm.c:234: error: implicit declaration of function 'vfree'
>> drivers/media/video/cx18/cx18-alsa-pcm.c:236: error: implicit declaration of function 'vmalloc'
>>
>> Caused by commit 5e9a302853301e0a2bb6671036daac3366fd85f4 ("V4L/DVB: cx18: overhaul ALSA PCM device handling so it works").
>>
>> I applied the following patch for today.
>>
>> From: Stephen Rothwell <sfr@canb.auug.org.au>
>> Date: Wed, 27 Jan 2010 17:53:39 +1100
>> Subject: [PATCH] V4L/DVB: using vmalloc requires include of linux/vmalloc.h
>>
>> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> 
> Stephen,
> 
> Looks good to me.
> 
> Acked-by: Andy Walls <awalls@radix.net>

Added at the tree.

Cheers,
Mauro.

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

* Re: linux-next: v4l-dvb tree build failure
  2010-01-27  6:59 Stephen Rothwell
@ 2010-01-27 23:24 ` Andy Walls
  2010-01-28  1:54   ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 41+ messages in thread
From: Andy Walls @ 2010-01-27 23:24 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Mauro Carvalho Chehab, linux-next, linux-kernel, Devin Heitmueller

On Wed, 2010-01-27 at 17:59 +1100, Stephen Rothwell wrote:
> Hi Mauro,
> 
> Today's linux-next build (powerpc allyesconfig) failed like this:
> 
> drivers/media/video/cx18/cx18-alsa-pcm.c: In function 'snd_pcm_alloc_vmalloc_buffer':
> drivers/media/video/cx18/cx18-alsa-pcm.c:234: error: implicit declaration of function 'vfree'
> drivers/media/video/cx18/cx18-alsa-pcm.c:236: error: implicit declaration of function 'vmalloc'
> 
> Caused by commit 5e9a302853301e0a2bb6671036daac3366fd85f4 ("V4L/DVB: cx18: overhaul ALSA PCM device handling so it works").
> 
> I applied the following patch for today.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 27 Jan 2010 17:53:39 +1100
> Subject: [PATCH] V4L/DVB: using vmalloc requires include of linux/vmalloc.h
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Stephen,

Looks good to me.

Acked-by: Andy Walls <awalls@radix.net>

Regards,
Andy

> ---
>  drivers/media/video/cx18/cx18-alsa-pcm.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/media/video/cx18/cx18-alsa-pcm.c b/drivers/media/video/cx18/cx18-alsa-pcm.c
> index 6e56df9..b9f42b1 100644
> --- a/drivers/media/video/cx18/cx18-alsa-pcm.c
> +++ b/drivers/media/video/cx18/cx18-alsa-pcm.c
> @@ -25,6 +25,7 @@
>  
>  #include <linux/init.h>
>  #include <linux/kernel.h>
> +#include <linux/vmalloc.h>
>  
>  #include <media/v4l2-device.h>
>  
> -- 
> 1.6.6
> 

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

* linux-next: v4l-dvb tree build failure
@ 2010-01-27  6:59 Stephen Rothwell
  2010-01-27 23:24 ` Andy Walls
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2010-01-27  6:59 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, linux-kernel, Devin Heitmueller

Hi Mauro,

Today's linux-next build (powerpc allyesconfig) failed like this:

drivers/media/video/cx18/cx18-alsa-pcm.c: In function 'snd_pcm_alloc_vmalloc_buffer':
drivers/media/video/cx18/cx18-alsa-pcm.c:234: error: implicit declaration of function 'vfree'
drivers/media/video/cx18/cx18-alsa-pcm.c:236: error: implicit declaration of function 'vmalloc'

Caused by commit 5e9a302853301e0a2bb6671036daac3366fd85f4 ("V4L/DVB: cx18: overhaul ALSA PCM device handling so it works").

I applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 27 Jan 2010 17:53:39 +1100
Subject: [PATCH] V4L/DVB: using vmalloc requires include of linux/vmalloc.h

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/media/video/cx18/cx18-alsa-pcm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/cx18/cx18-alsa-pcm.c b/drivers/media/video/cx18/cx18-alsa-pcm.c
index 6e56df9..b9f42b1 100644
--- a/drivers/media/video/cx18/cx18-alsa-pcm.c
+++ b/drivers/media/video/cx18/cx18-alsa-pcm.c
@@ -25,6 +25,7 @@
 
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/vmalloc.h>
 
 #include <media/v4l2-device.h>
 
-- 
1.6.6

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

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

* Re: linux-next: v4l-dvb tree build failure
  2009-03-27 11:28 ` Mauro Carvalho Chehab
@ 2009-03-27 14:03   ` Stephen Rothwell
  0 siblings, 0 replies; 41+ messages in thread
From: Stephen Rothwell @ 2009-03-27 14:03 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, Mike Isely

[-- Attachment #1: Type: text/plain, Size: 519 bytes --]

Hi Mauro,

On Fri, 27 Mar 2009 08:28:59 -0300 Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
>

> This was fixed by this patch:
> 	http://patchwork.kernel.org/patch/14545/
> 
> What's weird is that, after noticing it, I folded this patch together with the
> original one. Maybe I forgot to push it or I've pushed after your pull.
> Probably you won't have problem on today's build.

Thanks.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2009-03-27  0:40 Stephen Rothwell
@ 2009-03-27 11:28 ` Mauro Carvalho Chehab
  2009-03-27 14:03   ` Stephen Rothwell
  0 siblings, 1 reply; 41+ messages in thread
From: Mauro Carvalho Chehab @ 2009-03-27 11:28 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, Mike Isely

On Fri, 27 Mar 2009 11:40:35 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Mauro,
> 
> Today's linux-next build (x86_64 allmodconfig) failed like this:
> 
> ERROR: "pvr2_cs53l32a_subdev_update" [drivers/media/video/pvrusb2/pvrusb2.ko] undefined!
> 
> Probably caused by commit 0c0ffee771caed42ab9655c36cceb0c70f518eda
> ("V4L/DVB (11207): pvrusb2: Add composite and s-video input support for
> OnAir devices").
> 
> I have used the v4l-dvb tree from next-20090326 for today.

This was fixed by this patch:
	http://patchwork.kernel.org/patch/14545/

What's weird is that, after noticing it, I folded this patch together with the
original one. Maybe I forgot to push it or I've pushed after your pull.
Probably you won't have problem on today's build.


Cheers,
Mauro

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

* linux-next: v4l-dvb tree build failure
@ 2009-03-27  0:40 Stephen Rothwell
  2009-03-27 11:28 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2009-03-27  0:40 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, Mike Isely

[-- Attachment #1: Type: text/plain, Size: 501 bytes --]

Hi Mauro,

Today's linux-next build (x86_64 allmodconfig) failed like this:

ERROR: "pvr2_cs53l32a_subdev_update" [drivers/media/video/pvrusb2/pvrusb2.ko] undefined!

Probably caused by commit 0c0ffee771caed42ab9655c36cceb0c70f518eda
("V4L/DVB (11207): pvrusb2: Add composite and s-video input support for
OnAir devices").

I have used the v4l-dvb tree from next-20090326 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2009-03-06  0:05   ` Stephen Rothwell
@ 2009-03-06  1:15     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 41+ messages in thread
From: Mauro Carvalho Chehab @ 2009-03-06  1:15 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, Igor M. Liplianin

On Fri, 6 Mar 2009 11:05:48 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Mauro,
> 
> On Thu, 5 Mar 2009 18:51:50 -0300 Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> >
> > Fixed.
> 
> Thanks.
> 
> > From time to time, I got an weird message like this when updating my remote
> > repository:
> > 
> > $ git --git-dir /home/v4l/tokernel/bare/linux-next.git push -f origin
> > Counting objects: 194, done.
> > Compressing objects: 100% (70/70), done.
> > Writing objects: 100% (93/93), 14.19 KiB, done.
> > Total 93 (delta 82), reused 24 (delta 23)
> > warning: updating the currently checked out branch; this may cause confusion,
> > as the index and working tree do not reflect changes that are now in HEAD.
> > To ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-next.git
> > 
> > What's more weird is that I never touch directly
> > on /home/v4l/tokernel/bare/linux-next.git, since this is just a local bare
> > tree. My procedure is to update the patches on a work tree, then push it to the
> > bare repository and then to kernel.org.
> 
> Is there some reason that you repo on kernel.org is not bare as well?

It is bare... 

Hmm... at config, it were marked with bare = false, not sure why.
Anyway, I manually Fixed config. It seemed to solve the issue.

Thanks!
Cheers,
Mauro

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

* Re: linux-next: v4l-dvb tree build failure
  2009-03-05 21:51 ` Mauro Carvalho Chehab
@ 2009-03-06  0:05   ` Stephen Rothwell
  2009-03-06  1:15     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2009-03-06  0:05 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, Igor M. Liplianin

[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]

Hi Mauro,

On Thu, 5 Mar 2009 18:51:50 -0300 Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
>
> Fixed.

Thanks.

> From time to time, I got an weird message like this when updating my remote
> repository:
> 
> $ git --git-dir /home/v4l/tokernel/bare/linux-next.git push -f origin
> Counting objects: 194, done.
> Compressing objects: 100% (70/70), done.
> Writing objects: 100% (93/93), 14.19 KiB, done.
> Total 93 (delta 82), reused 24 (delta 23)
> warning: updating the currently checked out branch; this may cause confusion,
> as the index and working tree do not reflect changes that are now in HEAD.
> To ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-next.git
> 
> What's more weird is that I never touch directly
> on /home/v4l/tokernel/bare/linux-next.git, since this is just a local bare
> tree. My procedure is to update the patches on a work tree, then push it to the
> bare repository and then to kernel.org.

Is there some reason that you repo on kernel.org is not bare as well?

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2009-03-05  0:35 Stephen Rothwell
@ 2009-03-05 21:51 ` Mauro Carvalho Chehab
  2009-03-06  0:05   ` Stephen Rothwell
  0 siblings, 1 reply; 41+ messages in thread
From: Mauro Carvalho Chehab @ 2009-03-05 21:51 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, Igor M. Liplianin

On Thu, 5 Mar 2009 11:35:50 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Mauro,
> 
> Today's linux-next build (x86_64 allmodconfig) failed like this:
> 
> drivers/media/dvb/frontends/stv6110.c:31:21: error: cx23885.h: No such file or directory
> 
> Probably caused by commit f8d3ae06b31f28ae98567407c529751032936fd6
> ("V4L/DVB (10799): Add support for ST STV6110 silicon tuner").
> 
> I have dropped the v4l-dvb tree for today.

Fixed.

Stephen,

>From time to time, I got an weird message like this when updating my remote
repository:

$ git --git-dir /home/v4l/tokernel/bare/linux-next.git push -f origin
Counting objects: 194, done.
Compressing objects: 100% (70/70), done.
Writing objects: 100% (93/93), 14.19 KiB, done.
Total 93 (delta 82), reused 24 (delta 23)
warning: updating the currently checked out branch; this may cause confusion,
as the index and working tree do not reflect changes that are now in HEAD.
To ssh://master.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-next.git

What's more weird is that I never touch directly
on /home/v4l/tokernel/bare/linux-next.git, since this is just a local bare
tree. My procedure is to update the patches on a work tree, then push it to the
bare repository and then to kernel.org.

Any ideas?

Cheers,
Mauro

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

* linux-next: v4l-dvb tree build failure
@ 2009-03-05  0:35 Stephen Rothwell
  2009-03-05 21:51 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2009-03-05  0:35 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, Igor M. Liplianin

[-- Attachment #1: Type: text/plain, Size: 458 bytes --]

Hi Mauro,

Today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/media/dvb/frontends/stv6110.c:31:21: error: cx23885.h: No such file or directory

Probably caused by commit f8d3ae06b31f28ae98567407c529751032936fd6
("V4L/DVB (10799): Add support for ST STV6110 silicon tuner").

I have dropped the v4l-dvb tree for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2009-03-02  0:30   ` Stephen Rothwell
@ 2009-03-02  2:52     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 41+ messages in thread
From: Mauro Carvalho Chehab @ 2009-03-02  2:52 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Michael Krufky, linux-next

On Mon, 2 Mar 2009, Stephen Rothwell wrote:

> Hi Michael,
>
> On Sun, 01 Mar 2009 19:08:49 -0500 Michael Krufky <mkrufky@linuxtv.org> wrote:
>>
>> Thanks for the heads up -- I fixed that a few days ago:
>>
>> http://linuxtv.org/hg/v4l-dvb/raw-rev/eae32c526e78
>>
>> I'm sure the fix will be included with Mauro's next push.

Yes. I'll merge the fix on my next -git update probably today afternoon.x
>
> Thanks.
>
>

-- 
Cheers,
Mauro Carvalho Chehab
http://linuxtv.org
mchehab@infradead.org

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

* Re: linux-next: v4l-dvb tree build failure
  2009-03-02  0:08 ` Michael Krufky
@ 2009-03-02  0:30   ` Stephen Rothwell
  2009-03-02  2:52     ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2009-03-02  0:30 UTC (permalink / raw)
  To: Michael Krufky; +Cc: Mauro Carvalho Chehab, linux-next

[-- Attachment #1: Type: text/plain, Size: 400 bytes --]

Hi Michael,

On Sun, 01 Mar 2009 19:08:49 -0500 Michael Krufky <mkrufky@linuxtv.org> wrote:
>
> Thanks for the heads up -- I fixed that a few days ago:
> 
> http://linuxtv.org/hg/v4l-dvb/raw-rev/eae32c526e78
> 
> I'm sure the fix will be included with Mauro's next push.

Thanks.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2009-03-02  0:05 Stephen Rothwell
@ 2009-03-02  0:08 ` Michael Krufky
  2009-03-02  0:30   ` Stephen Rothwell
  0 siblings, 1 reply; 41+ messages in thread
From: Michael Krufky @ 2009-03-02  0:08 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Mauro Carvalho Chehab, linux-next

Stephen,

Thanks for the heads up -- I fixed that a few days ago:

http://linuxtv.org/hg/v4l-dvb/raw-rev/eae32c526e78

I'm sure the fix will be included with Mauro's next push.

Regards,

Mike Krufky

Stephen Rothwell wrote:
> Hi Mauro,
>
> Today's linux-next build (x86_64 allmodconfig) failed like this:
>
> ERROR: "sms_dbg" [drivers/media/dvb/siano/smsusb.ko] undefined!
> ERROR: "sms_dbg" [drivers/media/dvb/siano/smsdvb.ko] undefined!
>
> Probably caused by commit 33b67084d284779ee2a30deebd2115f79b8435b9
> ("V4L/DVB (10751): sms1xxx: fix checkpatch.pl violations introduced by
> previous changeset").
>
> I have dropped the v4l-dvb tree for today.
>   

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

* linux-next: v4l-dvb tree build failure
@ 2009-03-02  0:05 Stephen Rothwell
  2009-03-02  0:08 ` Michael Krufky
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2009-03-02  0:05 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, Michael Krufky

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

Hi Mauro,

Today's linux-next build (x86_64 allmodconfig) failed like this:

ERROR: "sms_dbg" [drivers/media/dvb/siano/smsusb.ko] undefined!
ERROR: "sms_dbg" [drivers/media/dvb/siano/smsdvb.ko] undefined!

Probably caused by commit 33b67084d284779ee2a30deebd2115f79b8435b9
("V4L/DVB (10751): sms1xxx: fix checkpatch.pl violations introduced by
previous changeset").

I have dropped the v4l-dvb tree for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* linux-next: v4l-dvb tree build failure
@ 2008-12-08  2:07 Stephen Rothwell
  0 siblings, 0 replies; 41+ messages in thread
From: Stephen Rothwell @ 2008-12-08  2:07 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next

[-- Attachment #1: Type: text/plain, Size: 2702 bytes --]

Hi Mauro,

Today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/media/video/em28xx/em28xx-video.c: In function 'em28xx_supports_audio_extension':
drivers/media/video/em28xx/em28xx-video.c:1966: error: 'EM28XX_NO_AUDIO' undeclared (first use in this function)
drivers/media/video/em28xx/em28xx-video.c:1977: error: 'EM28XX_AC97' undeclared (first use in this function)
drivers/media/video/em28xx/em28xx-video.c:1981: error: 'EM28XX_I2S_3_SAMPLE_RATES' undeclared (first use in this function)
drivers/media/video/em28xx/em28xx-video.c:1985: error: 'EM28XX_I2S_5_SAMPLE_RATES' undeclared (first use in this function)
drivers/media/video/em28xx/em28xx-core.c: In function 'em28xx_set_audio_source':
drivers/media/video/em28xx/em28xx-core.c:394: warning: ISO C90 forbids mixed declarations and code
drivers/media/video/em28xx/em28xx-core.c:459: error: non-static declaration of 'em28xx_audio_analog_set' follows static declaration
drivers/media/video/em28xx/em28xx-core.c:403: error: previous definition of 'em28xx_audio_analog_set' was here
drivers/media/video/em28xx/em28xx-core.c:556: error: non-static declaration of 'em28xx_audio_setup' follows static declaration
drivers/media/video/em28xx/em28xx-core.c:462: error: previous definition of 'em28xx_audio_setup' was here
drivers/media/video/em28xx/em28xx-core.c:632: error: invalid storage class for function 'em28xx_accumulator_set'
drivers/media/video/em28xx/em28xx-core.c:644: error: invalid storage class for function 'em28xx_capture_area_set'
drivers/media/video/em28xx/em28xx-core.c:661: error: invalid storage class for function 'em28xx_scaler_set'
drivers/media/video/em28xx/em28xx-core.c:790: error: non-static declaration of 'em28xx_set_mode' follows static declaration
drivers/media/video/em28xx/em28xx-core.c:771: error: previous definition of 'em28xx_set_mode' was here
drivers/media/video/em28xx/em28xx-core.c:800: error: invalid storage class for function 'em28xx_irq_callback'
drivers/media/video/em28xx/em28xx-core.c:861: error: non-static declaration of 'em28xx_uninit_isoc' follows static declaration
drivers/media/video/em28xx/em28xx-core.c:828: error: previous definition of 'em28xx_uninit_isoc' was here
drivers/media/video/em28xx/em28xx-core.c:966: error: non-static declaration of 'em28xx_init_isoc' follows static declaration
drivers/media/video/em28xx/em28xx-core.c:869: error: previous definition of 'em28xx_init_isoc' was here
drivers/media/video/em28xx/em28xx-core.c:966: error: expected declaration or statement at end of input

So I have dropped the tree for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2008-12-03  0:08   ` Stephen Rothwell
@ 2008-12-03 22:49     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 41+ messages in thread
From: Mauro Carvalho Chehab @ 2008-12-03 22:49 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next

On Wed, 3 Dec 2008 11:08:43 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Mauro,
> 
> On Tue, 2 Dec 2008 08:03:02 -0200 Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> >
> > On Tue, 2 Dec 2008 10:37:41 +1100
> > Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > 
> > > Today's linux-next build (x86_64 allmodconfig) failed like this:
> > > 
> > > drivers/media/video/em28xx/em28xx-video.c: In function 'em28xx_supports_audio_extension':
> > > drivers/media/video/em28xx/em28xx-video.c:1966: error: 'EM28XX_NO_AUDIO' undeclared (first use in this function)
> > > drivers/media/video/em28xx/em28xx-video.c:1966: error: (Each undeclared identifier is reported only once
> > > drivers/media/video/em28xx/em28xx-video.c:1966: error: for each function it appears in.)
> > > drivers/media/video/em28xx/em28xx-video.c:1977: error: 'EM28XX_AC97' undeclared (first use in this function)
> > > drivers/media/video/em28xx/em28xx-video.c:1981: error: 'EM28XX_I2S_3_SAMPLE_RATES' undeclared (first use in this function)
> > > drivers/media/video/em28xx/em28xx-video.c:1985: error: 'EM28XX_I2S_5_SAMPLE_RATES' undeclared (first use in this function)
> > > 
> > > I have dropped the v4l-dvb tree again today.
> > 
> > I suspect you've pulled from my tree while I was testing it, or before my last
> > update yesterday night. Anyway, I've re-merged my patches at my linux-next and
> > tested. Everything seems to be ok now.
> 
> I got the same error as yesterday, so the tree remains dropped.
> 
> Just to be clear, I am fetching the master branch of
> git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-next.git and
> it doesn't appear to have changed since yesterday's fetch.

I've pushed on linux-next from the wrong local branch. That's why I was compiling fine here...

I fixed earlier today.

Cheers,
Mauro

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

* Re: linux-next: v4l-dvb tree build failure
  2008-12-02 22:23   ` Stephen Rothwell
@ 2008-12-03 22:48     ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 41+ messages in thread
From: Mauro Carvalho Chehab @ 2008-12-03 22:48 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next

On Wed, 3 Dec 2008 09:23:54 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Mauro,
> 
> On Tue, 2 Dec 2008 08:03:02 -0200 Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> >
> > I suspect you've pulled from my tree while I was testing it, or before my last
> > update yesterday night. Anyway, I've re-merged my patches at my linux-next and
> > tested. Everything seems to be ok now.
> 
> You should do things in this order:
> 	write, and test your own patches
> 	gather patches form other people
> 	make sure all the patches have been posted on some appropriate
> 		mailing list for review
> 	put all the patches in a private tree
> 	test
All of those are done.

I also have some additional steps, since the development repository is based on mercurial:

	Convert patches to -git
	Split fixes and next patches
	Solve merge conflicts, when a linux-next patch depends on an upstream patch;
	Merge the trees again, for linux-next;
> 	publish the tree for linux-next (and others)

Cheers,
Mauro

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

* Re: linux-next: v4l-dvb tree build failure
  2008-12-02 10:03 ` Mauro Carvalho Chehab
  2008-12-02 22:23   ` Stephen Rothwell
@ 2008-12-03  0:08   ` Stephen Rothwell
  2008-12-03 22:49     ` Mauro Carvalho Chehab
  1 sibling, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2008-12-03  0:08 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next

[-- Attachment #1: Type: text/plain, Size: 1690 bytes --]

Hi Mauro,

On Tue, 2 Dec 2008 08:03:02 -0200 Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
>
> On Tue, 2 Dec 2008 10:37:41 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Today's linux-next build (x86_64 allmodconfig) failed like this:
> > 
> > drivers/media/video/em28xx/em28xx-video.c: In function 'em28xx_supports_audio_extension':
> > drivers/media/video/em28xx/em28xx-video.c:1966: error: 'EM28XX_NO_AUDIO' undeclared (first use in this function)
> > drivers/media/video/em28xx/em28xx-video.c:1966: error: (Each undeclared identifier is reported only once
> > drivers/media/video/em28xx/em28xx-video.c:1966: error: for each function it appears in.)
> > drivers/media/video/em28xx/em28xx-video.c:1977: error: 'EM28XX_AC97' undeclared (first use in this function)
> > drivers/media/video/em28xx/em28xx-video.c:1981: error: 'EM28XX_I2S_3_SAMPLE_RATES' undeclared (first use in this function)
> > drivers/media/video/em28xx/em28xx-video.c:1985: error: 'EM28XX_I2S_5_SAMPLE_RATES' undeclared (first use in this function)
> > 
> > I have dropped the v4l-dvb tree again today.
> 
> I suspect you've pulled from my tree while I was testing it, or before my last
> update yesterday night. Anyway, I've re-merged my patches at my linux-next and
> tested. Everything seems to be ok now.

I got the same error as yesterday, so the tree remains dropped.

Just to be clear, I am fetching the master branch of
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-next.git and
it doesn't appear to have changed since yesterday's fetch.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2008-12-02 10:03 ` Mauro Carvalho Chehab
@ 2008-12-02 22:23   ` Stephen Rothwell
  2008-12-03 22:48     ` Mauro Carvalho Chehab
  2008-12-03  0:08   ` Stephen Rothwell
  1 sibling, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2008-12-02 22:23 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next

[-- Attachment #1: Type: text/plain, Size: 714 bytes --]

Hi Mauro,

On Tue, 2 Dec 2008 08:03:02 -0200 Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
>
> I suspect you've pulled from my tree while I was testing it, or before my last
> update yesterday night. Anyway, I've re-merged my patches at my linux-next and
> tested. Everything seems to be ok now.

You should do things in this order:
	write, and test your own patches
	gather patches form other people
	make sure all the patches have been posted on some appropriate
		mailing list for review
	put all the patches in a private tree
	test
	publish the tree for linux-next (and others)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2008-12-01 23:37 Stephen Rothwell
@ 2008-12-02 10:03 ` Mauro Carvalho Chehab
  2008-12-02 22:23   ` Stephen Rothwell
  2008-12-03  0:08   ` Stephen Rothwell
  0 siblings, 2 replies; 41+ messages in thread
From: Mauro Carvalho Chehab @ 2008-12-02 10:03 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next

On Tue, 2 Dec 2008 10:37:41 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Mauro,
> 
> Today's linux-next build (x86_64 allmodconfig) failed like this:
> 
> drivers/media/video/em28xx/em28xx-video.c: In function 'em28xx_supports_audio_extension':
> drivers/media/video/em28xx/em28xx-video.c:1966: error: 'EM28XX_NO_AUDIO' undeclared (first use in this function)
> drivers/media/video/em28xx/em28xx-video.c:1966: error: (Each undeclared identifier is reported only once
> drivers/media/video/em28xx/em28xx-video.c:1966: error: for each function it appears in.)
> drivers/media/video/em28xx/em28xx-video.c:1977: error: 'EM28XX_AC97' undeclared (first use in this function)
> drivers/media/video/em28xx/em28xx-video.c:1981: error: 'EM28XX_I2S_3_SAMPLE_RATES' undeclared (first use in this function)
> drivers/media/video/em28xx/em28xx-video.c:1985: error: 'EM28XX_I2S_5_SAMPLE_RATES' undeclared (first use in this function)
> 
> I have dropped the v4l-dvb tree again today.

I suspect you've pulled from my tree while I was testing it, or before my last
update yesterday night. Anyway, I've re-merged my patches at my linux-next and
tested. Everything seems to be ok now.


Cheers,
Mauro

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

* linux-next: v4l-dvb tree build failure
@ 2008-12-01 23:37 Stephen Rothwell
  2008-12-02 10:03 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2008-12-01 23:37 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next

[-- Attachment #1: Type: text/plain, Size: 995 bytes --]

Hi Mauro,

Today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/media/video/em28xx/em28xx-video.c: In function 'em28xx_supports_audio_extension':
drivers/media/video/em28xx/em28xx-video.c:1966: error: 'EM28XX_NO_AUDIO' undeclared (first use in this function)
drivers/media/video/em28xx/em28xx-video.c:1966: error: (Each undeclared identifier is reported only once
drivers/media/video/em28xx/em28xx-video.c:1966: error: for each function it appears in.)
drivers/media/video/em28xx/em28xx-video.c:1977: error: 'EM28XX_AC97' undeclared (first use in this function)
drivers/media/video/em28xx/em28xx-video.c:1981: error: 'EM28XX_I2S_3_SAMPLE_RATES' undeclared (first use in this function)
drivers/media/video/em28xx/em28xx-video.c:1985: error: 'EM28XX_I2S_5_SAMPLE_RATES' undeclared (first use in this function)

I have dropped the v4l-dvb tree again today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* linux-next: v4l-dvb tree build failure
@ 2008-11-25  4:41 Stephen Rothwell
  0 siblings, 0 replies; 41+ messages in thread
From: Stephen Rothwell @ 2008-11-25  4:41 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, Devin Heitmueller

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

Hi Mauro,

Today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/media/video/em28xx/em28xx-core.c: In function 'em28xx_set_audio_source':
drivers/media/video/em28xx/em28xx-core.c:372: error: 'video' undeclared (first use in this function)
drivers/media/video/em28xx/em28xx-core.c:372: error: 'disable' undeclared (first use in this function)
drivers/media/video/em28xx/em28xx-core.c:373: error: 'line' undeclared (first use in this function)
drivers/media/video/em28xx/em28xx-core.c:373: error: 'enable' undeclared (first use in this function)

Caused by a bad merge of commits
3f9b46c154da5ec4facca88f82d1820eb329fd3e ("V4L/DVB (9632): make em28xx
aux audio input work") and 2173b4ae6f8262d15fc933a13191cd6d5e789e8d
("V4L/DVB (9651): em28xx: Improve audio handling").

I have dropped the v4l-dvb tree for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2008-11-12  0:54     ` Mauro Carvalho Chehab
@ 2008-11-12 22:45       ` Greg KH
  0 siblings, 0 replies; 41+ messages in thread
From: Greg KH @ 2008-11-12 22:45 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Harvey Harrison, Stephen Rothwell, linux-next, Hans Verkuil

On Tue, Nov 11, 2008 at 10:54:30PM -0200, Mauro Carvalho Chehab wrote:
 
> 1) There were two ioctls that weren't supported by video_ioctl2(). This
> changeset provides the proper implementation:
> 
> http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-next.git;a=commit;h=b35e0c6035369de9f3273b6a3fbb1c67f830cf49
> 
> You'll need this patch in order to compile go7007. It is currently at
> linux-next. It is safe to add this upstream, but this is not a bug fix
> patch. So, it seems a little late to add this there...
> 
> Maybe we can just add an #if 0 for the two functions that implement those
> ioctls upstream. 

Thanks, I've done this to this patch.

> 2) go7007 used to implement his own proprietary code to allow controlling mpeg
> encoding parameters. At the time go7007 driver were written, there weren't any
> other options, but, since kernel 2.6.18, 3 newer ioctls were added, in
> order to support ivtv driver. So, I can't see any reason to keep those proprietary userpspace API, when we 
> 
> Those ioctls allows a proper setup for encoding and decoding parameters for
> mpeg, mpeg2, mpeg4 (and are extensive to allow other formats).
> 
> The conversion to use those ioctls would be more complex, and I was too lazy
> for doing this conversion right now ;)
> 
> So, on this patch, I just commented the affected code with #if 0. Hopefully,
> someone with more time may implement VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS and
> VIDIOC_TRY_EXT_CTRLS.
> 
> If nobody volunteer to do it, I may seek for sometime later to do it.

I think I already have this converted in my tree now from one of the
original authors.

thanks a lot for the patch, I appreciate it.

greg k-h

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

* Re: linux-next: v4l-dvb tree build failure
  2008-11-07 18:41   ` Greg KH
  2008-11-07 23:02     ` Stephen Rothwell
@ 2008-11-12  0:54     ` Mauro Carvalho Chehab
  2008-11-12 22:45       ` Greg KH
  1 sibling, 1 reply; 41+ messages in thread
From: Mauro Carvalho Chehab @ 2008-11-12  0:54 UTC (permalink / raw)
  To: Greg KH; +Cc: Harvey Harrison, Stephen Rothwell, linux-next, Hans Verkuil

Hi Greg,

On Fri, 7 Nov 2008 10:41:48 -0800
Greg KH <greg@kroah.com> wrote:

> On Fri, Nov 07, 2008 at 09:43:57AM -0800, Harvey Harrison wrote:
> > On Fri, 2008-11-07 at 14:30 +1100, Stephen Rothwell wrote:
> > > Hi Mauro,
> > > 
> > > Today's linux-next build (x86_64 allmodconfig) failed like this:
> > > 
> > > drivers/staging/go7007/go7007-v4l2.c: In function 'go7007_ioctl':
> > > drivers/staging/go7007/go7007-v4l2.c:1338: warning: passing argument 1 of 'video_usercopy' from incompatible pointer type
> > > drivers/staging/go7007/go7007-v4l2.c:1338: warning: passing argument 2 of 'video_usercopy' makes integer from pointer without a cast
> > > drivers/staging/go7007/go7007-v4l2.c:1338: warning: passing argument 4 of 'video_usercopy' makes pointer from integer without a cast
> > > drivers/staging/go7007/go7007-v4l2.c:1338: error: too many arguments to function 'video_usercopy'

I've prepared a fix for the above errors.

Instead of just fixing the parameter of the legacy video_usercopy(), the better
is to convert it into video_ioctl2() method.

The enclosed patch does this.

-

A few notes about the patch:

1) There were two ioctls that weren't supported by video_ioctl2(). This
changeset provides the proper implementation:

http://git.kernel.org/?p=linux/kernel/git/mchehab/linux-next.git;a=commit;h=b35e0c6035369de9f3273b6a3fbb1c67f830cf49

You'll need this patch in order to compile go7007. It is currently at
linux-next. It is safe to add this upstream, but this is not a bug fix
patch. So, it seems a little late to add this there...

Maybe we can just add an #if 0 for the two functions that implement those
ioctls upstream. 

Those are the handlers that only exist at linux-next:

diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h
index f598572..c884432 100644
--- a/include/media/v4l2-ioctl.h
+++ b/include/media/v4l2-ioctl.h
@@ -232,6 +232,12 @@ struct v4l2_ioctl_ops {
 	int (*vidioc_g_chip_ident)     (struct file *file, void *fh,
 					struct v4l2_chip_ident *chip);
 
+	int (*vidioc_enum_framesizes)   (struct file *file, void *fh,
+					 struct v4l2_frmsizeenum *fsize);
+
+	int (*vidioc_enum_frameintervals) (struct file *file, void *fh,
+					   struct v4l2_frmivalenum *fival);
+
 	/* For other private ioctls */
 	int (*vidioc_default)	       (struct file *file, void *fh,
 					int cmd, void *arg);

2) go7007 used to implement his own proprietary code to allow controlling mpeg
encoding parameters. At the time go7007 driver were written, there weren't any
other options, but, since kernel 2.6.18, 3 newer ioctls were added, in
order to support ivtv driver. So, I can't see any reason to keep those proprietary userpspace API, when we 

Those ioctls allows a proper setup for encoding and decoding parameters for
mpeg, mpeg2, mpeg4 (and are extensive to allow other formats).

The conversion to use those ioctls would be more complex, and I was too lazy
for doing this conversion right now ;)

So, on this patch, I just commented the affected code with #if 0. Hopefully,
someone with more time may implement VIDIOC_G_EXT_CTRLS, VIDIOC_S_EXT_CTRLS and
VIDIOC_TRY_EXT_CTRLS.

If nobody volunteer to do it, I may seek for sometime later to do it.

3) I have some saa7134 boards here, but none with go7007. So, I couldn't test
the patch. All I know is that it compiles fine and has no CodingStyle
errors, so, someone need to validate it and test.

Cheers,
Mauro

---

go7007: Convert driver to use video_ioctl2

go7007 driver were using the old method of having a big switch for handling
ioctls. Use instead the new video_ioctl2 method.

This patch also adds support for the 2.6.19 new ioctls to enumberate video
formats and intervals.

Still lacking the implementation of compression ioctls needed on go7007.

This patch weren't tested, due to the lack of a hardware with me.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

diff --git a/drivers/staging/go7007/go7007-v4l2.c b/drivers/staging/go7007/go7007-v4l2.c
index 94e1141..5849153 100644
--- a/drivers/staging/go7007/go7007-v4l2.c
+++ b/drivers/staging/go7007/go7007-v4l2.c
@@ -375,499 +375,584 @@ static int clip_to_modet_map(struct go7007 *go, int region,
 	return 0;
 }
 
-static int go7007_do_ioctl(struct inode *inode, struct file *file,
-		unsigned int cmd, void *arg)
+static int vidioc_querycap(struct file *file, void  *priv,
+					struct v4l2_capability *cap)
 {
-	struct go7007_file *gofh = file->private_data;
+	struct go7007_file *gofh = priv;
 	struct go7007 *go = gofh->go;
-	unsigned long flags;
-	int retval = 0;
 
-	switch (cmd) {
-	case VIDIOC_QUERYCAP:
-	{
-		struct v4l2_capability *cap = arg;
-
-		memset(cap, 0, sizeof(*cap));
-		strcpy(cap->driver, "go7007");
-		strncpy(cap->card, go->name, sizeof(cap->card));
-		cap->version = KERNEL_VERSION(0, 9, 8);
-		cap->capabilities = V4L2_CAP_VIDEO_CAPTURE |
-				V4L2_CAP_STREAMING; /* | V4L2_CAP_AUDIO; */
-		if (go->board_info->flags & GO7007_BOARD_HAS_TUNER)
-			cap->capabilities |= V4L2_CAP_TUNER;
-		return 0;
-	}
-	case VIDIOC_ENUM_FMT:
-	{
-		struct v4l2_fmtdesc *fmt = arg;
-		unsigned int index;
-		char *desc;
-		u32 pixelformat;
+	strlcpy(cap->driver, "go7007", sizeof(cap->driver));
+	strlcpy(cap->card, go->name, sizeof(cap->card));
+#if 0
+	strlcpy(cap->bus_info, dev_name(&dev->udev->dev), sizeof(cap->bus_info));
+#endif
 
-		if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-			return -EINVAL;
-		switch (fmt->index) {
-		case 0:
-			pixelformat = V4L2_PIX_FMT_MJPEG;
-			desc = "Motion-JPEG";
-			break;
-		case 1:
-			pixelformat = V4L2_PIX_FMT_MPEG;
-			desc = "MPEG1/MPEG2/MPEG4";
-			break;
-		default:
-			return -EINVAL;
-		}
-		index = fmt->index;
-		memset(fmt, 0, sizeof(*fmt));
-		fmt->index = index;
-		fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-		fmt->flags = V4L2_FMT_FLAG_COMPRESSED;
-		strncpy(fmt->description, desc, sizeof(fmt->description));
-		fmt->pixelformat = pixelformat;
+	cap->version = KERNEL_VERSION(0, 9, 8);
 
-		return 0;
-	}
-	case VIDIOC_TRY_FMT:
-	{
-		struct v4l2_format *fmt = arg;
+	cap->capabilities = V4L2_CAP_VIDEO_CAPTURE |
+			    V4L2_CAP_STREAMING; /* | V4L2_CAP_AUDIO; */
 
-		if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-			return -EINVAL;
-		return set_capture_size(go, fmt, 1);
-	}
-	case VIDIOC_G_FMT:
-	{
-		struct v4l2_format *fmt = arg;
+	if (go->board_info->flags & GO7007_BOARD_HAS_TUNER)
+		cap->capabilities |= V4L2_CAP_TUNER;
 
-		if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-			return -EINVAL;
-		memset(fmt, 0, sizeof(*fmt));
-		fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-		fmt->fmt.pix.width = go->width;
-		fmt->fmt.pix.height = go->height;
-		fmt->fmt.pix.pixelformat = go->format == GO7007_FORMAT_MJPEG ?
-			V4L2_PIX_FMT_MJPEG : V4L2_PIX_FMT_MPEG;
-		fmt->fmt.pix.field = V4L2_FIELD_NONE;
-		fmt->fmt.pix.bytesperline = 0;
-		fmt->fmt.pix.sizeimage = GO7007_BUF_SIZE;
-		fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M; /* ?? */
-		return 0;
-	}
-	case VIDIOC_S_FMT:
-	{
-		struct v4l2_format *fmt = arg;
+	return 0;
+}
 
-		if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-			return -EINVAL;
-		if (go->streaming)
-			return -EBUSY;
-		return set_capture_size(go, fmt, 0);
-	}
-	case VIDIOC_G_FBUF:
-	case VIDIOC_S_FBUF:
+static int vidioc_enum_fmt_vid_cap(struct file *file, void  *priv,
+					struct v4l2_fmtdesc *fmt)
+{
+	char *desc = NULL;
+
+	switch (fmt->index) {
+	case 0:
+		fmt->pixelformat = V4L2_PIX_FMT_MJPEG;
+		desc = "Motion-JPEG";
+		break;
+	case 1:
+		fmt->pixelformat = V4L2_PIX_FMT_MPEG;
+		desc = "MPEG1/MPEG2/MPEG4";
+		break;
+	default:
 		return -EINVAL;
-	case VIDIOC_REQBUFS:
-	{
-		struct v4l2_requestbuffers *req = arg;
-		unsigned int count, i;
+	}
+	fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+	fmt->flags = V4L2_FMT_FLAG_COMPRESSED;
 
-		if (go->streaming)
-			return -EBUSY;
-		if (req->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
-				req->memory != V4L2_MEMORY_MMAP)
-			return -EINVAL;
+	strncpy(fmt->description, desc, sizeof(fmt->description));
 
-		down(&gofh->lock);
-		retval = -EBUSY;
-		for (i = 0; i < gofh->buf_count; ++i)
-			if (gofh->bufs[i].mapped > 0)
-				goto unlock_and_return;
-		down(&go->hw_lock);
-		if (go->in_use > 0 && gofh->buf_count == 0) {
-			up(&go->hw_lock);
+	return 0;
+}
+
+static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
+					struct v4l2_format *fmt)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+
+	fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+	fmt->fmt.pix.width = go->width;
+	fmt->fmt.pix.height = go->height;
+	fmt->fmt.pix.pixelformat = (go->format == GO7007_FORMAT_MJPEG) ?
+				   V4L2_PIX_FMT_MJPEG : V4L2_PIX_FMT_MPEG;
+	fmt->fmt.pix.field = V4L2_FIELD_NONE;
+	fmt->fmt.pix.bytesperline = 0;
+	fmt->fmt.pix.sizeimage = GO7007_BUF_SIZE;
+	fmt->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
+
+	return 0;
+}
+
+static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
+			struct v4l2_format *fmt)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+
+	return set_capture_size(go, fmt, 1);
+}
+
+static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
+			struct v4l2_format *fmt)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+
+	if (go->streaming)
+		return -EBUSY;
+
+	return set_capture_size(go, fmt, 0);
+}
+
+static int vidioc_reqbufs(struct file *file, void *priv,
+			  struct v4l2_requestbuffers *req)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+	int retval = -EBUSY;
+	unsigned int count, i;
+
+	if (go->streaming)
+		return retval;
+
+	if (req->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
+			req->memory != V4L2_MEMORY_MMAP)
+		return -EINVAL;
+
+	down(&gofh->lock);
+	for (i = 0; i < gofh->buf_count; ++i)
+		if (gofh->bufs[i].mapped > 0)
 			goto unlock_and_return;
-		}
-		if (gofh->buf_count > 0)
-			kfree(gofh->bufs);
-		retval = -ENOMEM;
-		count = req->count;
-		if (count > 0) {
-			if (count < 2)
-				count = 2;
-			if (count > 32)
-				count = 32;
-			gofh->bufs = kmalloc(count *
-						sizeof(struct go7007_buffer),
-					GFP_KERNEL);
-			if (gofh->bufs == NULL) {
-				up(&go->hw_lock);
-				goto unlock_and_return;
-			}
-			memset(gofh->bufs, 0,
-					count * sizeof(struct go7007_buffer));
-			for (i = 0; i < count; ++i) {
-				gofh->bufs[i].go = go;
-				gofh->bufs[i].index = i;
-				gofh->bufs[i].state = BUF_STATE_IDLE;
-				gofh->bufs[i].mapped = 0;
-			}
-			go->in_use = 1;
-		} else {
-			go->in_use = 0;
-		}
-		gofh->buf_count = count;
+
+	down(&go->hw_lock);
+	if (go->in_use > 0 && gofh->buf_count == 0) {
 		up(&go->hw_lock);
-		up(&gofh->lock);
-		memset(req, 0, sizeof(*req));
-		req->count = count;
-		req->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-		req->memory = V4L2_MEMORY_MMAP;
-		return 0;
+		goto unlock_and_return;
 	}
-	case VIDIOC_QUERYBUF:
-	{
-		struct v4l2_buffer *buf = arg;
-		unsigned int index;
 
-		retval = -EINVAL;
-		if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-			return -EINVAL;
-		index = buf->index;
-		down(&gofh->lock);
-		if (index >= gofh->buf_count)
-			goto unlock_and_return;
-		memset(buf, 0, sizeof(*buf));
-		buf->index = index;
-		buf->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-		switch (gofh->bufs[index].state) {
-		case BUF_STATE_QUEUED:
-			buf->flags = V4L2_BUF_FLAG_QUEUED;
-			break;
-		case BUF_STATE_DONE:
-			buf->flags = V4L2_BUF_FLAG_DONE;
-			break;
-		default:
-			buf->flags = 0;
-		}
-		if (gofh->bufs[index].mapped)
-			buf->flags |= V4L2_BUF_FLAG_MAPPED;
-		buf->memory = V4L2_MEMORY_MMAP;
-		buf->m.offset = index * GO7007_BUF_SIZE;
-		buf->length = GO7007_BUF_SIZE;
-		up(&gofh->lock);
+	if (gofh->buf_count > 0)
+		kfree(gofh->bufs);
 
-		return 0;
-	}
-	case VIDIOC_QBUF:
-	{
-		struct v4l2_buffer *buf = arg;
-		struct go7007_buffer *gobuf;
-		int ret;
+	retval = -ENOMEM;
+	count = req->count;
+	if (count > 0) {
+		if (count < 2)
+			count = 2;
+		if (count > 32)
+			count = 32;
 
-		retval = -EINVAL;
-		if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
-				buf->memory != V4L2_MEMORY_MMAP)
-			return -EINVAL;
-		down(&gofh->lock);
-		if (buf->index < 0 || buf->index >= gofh->buf_count)
-			goto unlock_and_return;
-		gobuf = &gofh->bufs[buf->index];
-		if (gobuf->mapped == 0)
-			goto unlock_and_return;
-		retval = -EBUSY;
-		if (gobuf->state != BUF_STATE_IDLE)
-			goto unlock_and_return;
-		/* offset will be 0 until we really support USERPTR streaming */
-		gobuf->offset = gobuf->user_addr & ~PAGE_MASK;
-		gobuf->bytesused = 0;
-		gobuf->frame_offset = 0;
-		gobuf->modet_active = 0;
-		if (gobuf->offset > 0)
-			gobuf->page_count = GO7007_BUF_PAGES + 1;
-		else
-			gobuf->page_count = GO7007_BUF_PAGES;
-		retval = -ENOMEM;
-		down_read(&current->mm->mmap_sem);
-		ret = get_user_pages(current, current->mm,
-				gobuf->user_addr & PAGE_MASK, gobuf->page_count,
-				1, 1, gobuf->pages, NULL);
-		up_read(&current->mm->mmap_sem);
-		if (ret != gobuf->page_count) {
-			int i;
-			for (i = 0; i < ret; ++i)
-				page_cache_release(gobuf->pages[i]);
-			gobuf->page_count = 0;
+		gofh->bufs = kmalloc(count * sizeof(struct go7007_buffer),
+				     GFP_KERNEL);
+
+		if (!gofh->bufs) {
+			up(&go->hw_lock);
 			goto unlock_and_return;
 		}
-		gobuf->state = BUF_STATE_QUEUED;
-		spin_lock_irqsave(&go->spinlock, flags);
-		list_add_tail(&gobuf->stream, &go->stream);
-		spin_unlock_irqrestore(&go->spinlock, flags);
-		up(&gofh->lock);
-		return 0;
-	}
-	case VIDIOC_DQBUF:
-	{
-		struct v4l2_buffer *buf = arg;
-		struct go7007_buffer *gobuf;
-		u32 frame_type_flag;
-		DEFINE_WAIT(wait);
 
-		if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-			return -EINVAL;
-		if (buf->memory != V4L2_MEMORY_MMAP)
-			return -EINVAL;
-		down(&gofh->lock);
-		retval = -EINVAL;
-		if (list_empty(&go->stream))
-			goto unlock_and_return;
-		gobuf = list_entry(go->stream.next,
-				struct go7007_buffer, stream);
-		retval = -EAGAIN;
-		if (gobuf->state != BUF_STATE_DONE &&
-				!(file->f_flags & O_NONBLOCK)) {
-			for (;;) {
-				prepare_to_wait(&go->frame_waitq, &wait,
-						TASK_INTERRUPTIBLE);
-				if (gobuf->state == BUF_STATE_DONE)
-					break;
-				if (signal_pending(current)) {
-					retval = -ERESTARTSYS;
-					break;
-				}
-				schedule();
-			}
-			finish_wait(&go->frame_waitq, &wait);
+		memset(gofh->bufs, 0, count * sizeof(struct go7007_buffer));
+
+		for (i = 0; i < count; ++i) {
+			gofh->bufs[i].go = go;
+			gofh->bufs[i].index = i;
+			gofh->bufs[i].state = BUF_STATE_IDLE;
+			gofh->bufs[i].mapped = 0;
 		}
-		if (gobuf->state != BUF_STATE_DONE)
-			goto unlock_and_return;
-		spin_lock_irqsave(&go->spinlock, flags);
-		deactivate_buffer(gobuf);
-		spin_unlock_irqrestore(&go->spinlock, flags);
-		frame_type_flag = get_frame_type_flag(gobuf, go->format);
-		gobuf->state = BUF_STATE_IDLE;
-		memset(buf, 0, sizeof(*buf));
-		buf->index = gobuf->index;
-		buf->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-		buf->bytesused = gobuf->bytesused;
-		buf->flags = V4L2_BUF_FLAG_MAPPED | frame_type_flag;
-		buf->field = V4L2_FIELD_NONE;
-		buf->timestamp = gobuf->timestamp;
-		buf->sequence = gobuf->seq;
-		buf->memory = V4L2_MEMORY_MMAP;
-		buf->m.offset = gobuf->index * GO7007_BUF_SIZE;
-		buf->length = GO7007_BUF_SIZE;
-		buf->reserved = gobuf->modet_active;
-		up(&gofh->lock);
-		return 0;
+
+		go->in_use = 1;
+	} else {
+		go->in_use = 0;
 	}
-	case VIDIOC_STREAMON:
-	{
-		unsigned int *type = arg;
 
-		if (*type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-			return -EINVAL;
-		down(&gofh->lock);
-		down(&go->hw_lock);
-		if (!go->streaming) {
-			go->streaming = 1;
-			go->next_seq = 0;
-			go->active_buf = NULL;
-			if (go7007_start_encoder(go) < 0)
-				retval = -EIO;
-			else
-				retval = 0;
-		}
-		up(&go->hw_lock);
-		up(&gofh->lock);
+	gofh->buf_count = count;
+	up(&go->hw_lock);
+	up(&gofh->lock);
+
+	memset(req, 0, sizeof(*req));
+
+	req->count = count;
+	req->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+	req->memory = V4L2_MEMORY_MMAP;
+
+	return 0;
+
+unlock_and_return:
+	up(&gofh->lock);
+	return retval;
+}
+
+static int vidioc_querybuf(struct file *file, void *priv,
+			   struct v4l2_buffer *buf)
+{
+	struct go7007_file *gofh = priv;
+	int retval = -EINVAL;
+	unsigned int index;
+
+	if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
 		return retval;
-	}
-	case VIDIOC_STREAMOFF:
-	{
-		unsigned int *type = arg;
 
-		if (*type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-			return -EINVAL;
-		down(&gofh->lock);
-		go7007_streamoff(go);
-		up(&gofh->lock);
-		return 0;
-	}
-	case VIDIOC_QUERYCTRL:
-	{
-		struct v4l2_queryctrl *ctrl = arg;
-		u32 id;
+	index = buf->index;
 
-		if (!go->i2c_adapter_online)
-			return -EIO;
-		id = ctrl->id;
-		memset(ctrl, 0, sizeof(*ctrl));
-		ctrl->id = id;
-		i2c_clients_command(&go->i2c_adapter, VIDIOC_QUERYCTRL, arg);
-		return ctrl->name[0] == 0 ? -EINVAL : 0;
-	}
-	case VIDIOC_G_CTRL:
-	{
-		struct v4l2_control *ctrl = arg;
-		struct v4l2_queryctrl query;
+	down(&gofh->lock);
+	if (index >= gofh->buf_count)
+		goto unlock_and_return;
 
-		if (!go->i2c_adapter_online)
-			return -EIO;
-		memset(&query, 0, sizeof(query));
-		query.id = ctrl->id;
-		i2c_clients_command(&go->i2c_adapter, VIDIOC_QUERYCTRL, &query);
-		if (query.name[0] == 0)
-			return -EINVAL;
-		i2c_clients_command(&go->i2c_adapter, VIDIOC_G_CTRL, arg);
-		return 0;
-	}
-	case VIDIOC_S_CTRL:
-	{
-		struct v4l2_control *ctrl = arg;
-		struct v4l2_queryctrl query;
+	memset(buf, 0, sizeof(*buf));
+	buf->index = index;
+	buf->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 
-		if (!go->i2c_adapter_online)
-			return -EIO;
-		memset(&query, 0, sizeof(query));
-		query.id = ctrl->id;
-		i2c_clients_command(&go->i2c_adapter, VIDIOC_QUERYCTRL, &query);
-		if (query.name[0] == 0)
-			return -EINVAL;
-		i2c_clients_command(&go->i2c_adapter, VIDIOC_S_CTRL, arg);
-		return 0;
+	switch (gofh->bufs[index].state) {
+	case BUF_STATE_QUEUED:
+		buf->flags = V4L2_BUF_FLAG_QUEUED;
+		break;
+	case BUF_STATE_DONE:
+		buf->flags = V4L2_BUF_FLAG_DONE;
+		break;
+	default:
+		buf->flags = 0;
 	}
-	case VIDIOC_G_PARM:
-	{
-		struct v4l2_streamparm *parm = arg;
-		struct v4l2_fract timeperframe = {
-			.numerator = 1001 *  go->fps_scale,
-			.denominator = go->sensor_framerate,
-		};
 
-		if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-			return -EINVAL;
-		memset(parm, 0, sizeof(*parm));
-		parm->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-		parm->parm.capture.capability |= V4L2_CAP_TIMEPERFRAME;
-		parm->parm.capture.timeperframe = timeperframe;
-		return 0;
-	}
-	case VIDIOC_S_PARM:
-	{
-		struct v4l2_streamparm *parm = arg;
-		unsigned int n, d;
+	if (gofh->bufs[index].mapped)
+		buf->flags |= V4L2_BUF_FLAG_MAPPED;
+	buf->memory = V4L2_MEMORY_MMAP;
+	buf->m.offset = index * GO7007_BUF_SIZE;
+	buf->length = GO7007_BUF_SIZE;
+	up(&gofh->lock);
 
-		if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-			return -EINVAL;
-		if (parm->parm.capture.capturemode != 0)
-			return -EINVAL;
-		n = go->sensor_framerate *
-			parm->parm.capture.timeperframe.numerator;
-		d = 1001 * parm->parm.capture.timeperframe.denominator;
-		if (n != 0 && d != 0 && n > d)
-			go->fps_scale = (n + d/2) / d;
-		else
-			go->fps_scale = 1;
-		return 0;
+	return 0;
+
+unlock_and_return:
+	up(&gofh->lock);
+	return retval;
+}
+
+static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+	struct go7007_buffer *gobuf;
+	unsigned long flags;
+	int retval = -EINVAL;
+	int ret;
+
+	if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
+			buf->memory != V4L2_MEMORY_MMAP)
+		return retval;
+
+	down(&gofh->lock);
+	if (buf->index < 0 || buf->index >= gofh->buf_count)
+		goto unlock_and_return;
+
+	gobuf = &gofh->bufs[buf->index];
+	if (!gobuf->mapped)
+		goto unlock_and_return;
+
+	retval = -EBUSY;
+	if (gobuf->state != BUF_STATE_IDLE)
+		goto unlock_and_return;
+
+	/* offset will be 0 until we really support USERPTR streaming */
+	gobuf->offset = gobuf->user_addr & ~PAGE_MASK;
+	gobuf->bytesused = 0;
+	gobuf->frame_offset = 0;
+	gobuf->modet_active = 0;
+	if (gobuf->offset > 0)
+		gobuf->page_count = GO7007_BUF_PAGES + 1;
+	else
+		gobuf->page_count = GO7007_BUF_PAGES;
+
+	retval = -ENOMEM;
+	down_read(&current->mm->mmap_sem);
+	ret = get_user_pages(current, current->mm,
+			gobuf->user_addr & PAGE_MASK, gobuf->page_count,
+			1, 1, gobuf->pages, NULL);
+	up_read(&current->mm->mmap_sem);
+
+	if (ret != gobuf->page_count) {
+		int i;
+		for (i = 0; i < ret; ++i)
+			page_cache_release(gobuf->pages[i]);
+		gobuf->page_count = 0;
+		goto unlock_and_return;
 	}
-	case VIDIOC_ENUMSTD:
-	{
-		struct v4l2_standard *std = arg;
 
-		if ((go->board_info->flags & GO7007_BOARD_HAS_TUNER) &&
-				go->input == go->board_info->num_inputs - 1) {
-			if (!go->i2c_adapter_online)
-				return -EIO;
-			i2c_clients_command(&go->i2c_adapter,
-						VIDIOC_ENUMSTD, arg);
-			if (!std->id) /* hack to indicate EINVAL from tuner */
-				return -EINVAL;
-		} else if (go->board_info->sensor_flags & GO7007_SENSOR_TV) {
-			switch (std->index) {
-			case 0:
-				v4l2_video_std_construct(std,
-						V4L2_STD_NTSC, "NTSC");
+	gobuf->state = BUF_STATE_QUEUED;
+	spin_lock_irqsave(&go->spinlock, flags);
+	list_add_tail(&gobuf->stream, &go->stream);
+	spin_unlock_irqrestore(&go->spinlock, flags);
+	up(&gofh->lock);
+
+	return 0;
+
+unlock_and_return:
+	up(&gofh->lock);
+	return retval;
+}
+
+
+static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *buf)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+	struct go7007_buffer *gobuf;
+	int retval = -EINVAL;
+	unsigned long flags;
+	u32 frame_type_flag;
+	DEFINE_WAIT(wait);
+
+	if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+		return retval;
+	if (buf->memory != V4L2_MEMORY_MMAP)
+		return retval;
+
+	down(&gofh->lock);
+	if (list_empty(&go->stream))
+		goto unlock_and_return;
+	gobuf = list_entry(go->stream.next,
+			struct go7007_buffer, stream);
+
+	retval = -EAGAIN;
+	if (gobuf->state != BUF_STATE_DONE &&
+			!(file->f_flags & O_NONBLOCK)) {
+		for (;;) {
+			prepare_to_wait(&go->frame_waitq, &wait,
+					TASK_INTERRUPTIBLE);
+			if (gobuf->state == BUF_STATE_DONE)
 				break;
-			case 1:
-				v4l2_video_std_construct(std,
-						V4L2_STD_PAL | V4L2_STD_SECAM,
-						"PAL/SECAM");
+			if (signal_pending(current)) {
+				retval = -ERESTARTSYS;
 				break;
-			default:
-				return -EINVAL;
 			}
-		} else {
-			if (std->index != 0)
-				return -EINVAL;
-			memset(std, 0, sizeof(*std));
-			snprintf(std->name, sizeof(std->name), "%dx%d, %dfps",
-				go->board_info->sensor_width,
-				go->board_info->sensor_height,
-				go->board_info->sensor_framerate / 1000);
-			std->frameperiod.numerator = 1001;
-			std->frameperiod.denominator =
-					go->board_info->sensor_framerate;
+			schedule();
 		}
-		return 0;
+		finish_wait(&go->frame_waitq, &wait);
 	}
-	case VIDIOC_G_STD:
-	{
-		v4l2_std_id *std = arg;
+	if (gobuf->state != BUF_STATE_DONE)
+		goto unlock_and_return;
+
+	spin_lock_irqsave(&go->spinlock, flags);
+	deactivate_buffer(gobuf);
+	spin_unlock_irqrestore(&go->spinlock, flags);
+	frame_type_flag = get_frame_type_flag(gobuf, go->format);
+	gobuf->state = BUF_STATE_IDLE;
+
+	memset(buf, 0, sizeof(*buf));
+	buf->index = gobuf->index;
+	buf->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+	buf->bytesused = gobuf->bytesused;
+	buf->flags = V4L2_BUF_FLAG_MAPPED | frame_type_flag;
+	buf->field = V4L2_FIELD_NONE;
+	buf->timestamp = gobuf->timestamp;
+	buf->sequence = gobuf->seq;
+	buf->memory = V4L2_MEMORY_MMAP;
+	buf->m.offset = gobuf->index * GO7007_BUF_SIZE;
+	buf->length = GO7007_BUF_SIZE;
+	buf->reserved = gobuf->modet_active;
 
-		if ((go->board_info->flags & GO7007_BOARD_HAS_TUNER) &&
-				go->input == go->board_info->num_inputs - 1) {
-			if (!go->i2c_adapter_online)
-				return -EIO;
-			i2c_clients_command(&go->i2c_adapter,
-						VIDIOC_G_STD, arg);
-		} else if (go->board_info->sensor_flags & GO7007_SENSOR_TV) {
-			if (go->standard == GO7007_STD_NTSC)
-				*std = V4L2_STD_NTSC;
-			else
-				*std = V4L2_STD_PAL | V4L2_STD_SECAM;
-		} else
-			*std = 0;
-		return 0;
+	up(&gofh->lock);
+	return 0;
+
+unlock_and_return:
+	up(&gofh->lock);
+	return retval;
+}
+
+static int vidioc_streamon(struct file *file, void *priv,
+					enum v4l2_buf_type type)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+	int retval = 0;
+
+	if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+		return -EINVAL;
+
+	down(&gofh->lock);
+	down(&go->hw_lock);
+
+	if (!go->streaming) {
+		go->streaming = 1;
+		go->next_seq = 0;
+		go->active_buf = NULL;
+		if (go7007_start_encoder(go) < 0)
+			retval = -EIO;
+		else
+			retval = 0;
 	}
-	case VIDIOC_S_STD:
-	{
-		v4l2_std_id *std = arg;
+	up(&go->hw_lock);
+	up(&gofh->lock);
 
-		if (go->streaming)
-			return -EBUSY;
-		if (!(go->board_info->sensor_flags & GO7007_SENSOR_TV) &&
-				*std != 0)
-			return -EINVAL;
-		if (*std == 0)
-			return -EINVAL;
-		if ((go->board_info->flags & GO7007_BOARD_HAS_TUNER) &&
-				go->input == go->board_info->num_inputs - 1) {
-			if (!go->i2c_adapter_online)
-				return -EIO;
-			i2c_clients_command(&go->i2c_adapter,
-						VIDIOC_S_STD, arg);
-			if (!*std) /* hack to indicate EINVAL from tuner */
-				return -EINVAL;
-		}
-		if (*std & V4L2_STD_NTSC) {
-			go->standard = GO7007_STD_NTSC;
-			go->sensor_framerate = 30000;
-		} else if (*std & V4L2_STD_PAL) {
-			go->standard = GO7007_STD_PAL;
-			go->sensor_framerate = 25025;
-		} else if (*std & V4L2_STD_SECAM) {
-			go->standard = GO7007_STD_PAL;
-			go->sensor_framerate = 25025;
-		} else
+	return retval;
+}
+
+static int vidioc_streamoff(struct file *file, void *priv,
+					enum v4l2_buf_type type)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+
+	if (type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+		return -EINVAL;
+	down(&gofh->lock);
+	go7007_streamoff(go);
+	up(&gofh->lock);
+
+	return 0;
+}
+
+static int vidioc_queryctrl(struct file *file, void *priv,
+			   struct v4l2_queryctrl *query)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+
+	if (!go->i2c_adapter_online)
+		return -EIO;
+
+	i2c_clients_command(&go->i2c_adapter, VIDIOC_QUERYCTRL, query);
+
+	return (!query->name[0]) ? -EINVAL : 0;
+}
+
+static int vidioc_g_ctrl(struct file *file, void *priv,
+				struct v4l2_control *ctrl)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+	struct v4l2_queryctrl query;
+
+	if (!go->i2c_adapter_online)
+		return -EIO;
+
+	memset(&query, 0, sizeof(query));
+	query.id = ctrl->id;
+	i2c_clients_command(&go->i2c_adapter, VIDIOC_QUERYCTRL, &query);
+	if (query.name[0] == 0)
+		return -EINVAL;
+	i2c_clients_command(&go->i2c_adapter, VIDIOC_G_CTRL, ctrl);
+
+	return 0;
+}
+
+static int vidioc_s_ctrl(struct file *file, void *priv,
+				struct v4l2_control *ctrl)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+	struct v4l2_queryctrl query;
+
+	if (!go->i2c_adapter_online)
+		return -EIO;
+
+	memset(&query, 0, sizeof(query));
+	query.id = ctrl->id;
+	i2c_clients_command(&go->i2c_adapter, VIDIOC_QUERYCTRL, &query);
+	if (query.name[0] == 0)
+		return -EINVAL;
+	i2c_clients_command(&go->i2c_adapter, VIDIOC_S_CTRL, ctrl);
+
+	return 0;
+}
+
+static int vidioc_g_parm(struct file *filp, void *priv,
+		struct v4l2_streamparm *parm)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+	struct v4l2_fract timeperframe = {
+		.numerator = 1001 *  go->fps_scale,
+		.denominator = go->sensor_framerate,
+	};
+
+	if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+		return -EINVAL;
+
+	parm->parm.capture.capability |= V4L2_CAP_TIMEPERFRAME;
+	parm->parm.capture.timeperframe = timeperframe;
+
+	return 0;
+}
+
+static int vidioc_s_parm(struct file *filp, void *priv,
+		struct v4l2_streamparm *parm)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+	unsigned int n, d;
+
+	if (parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+		return -EINVAL;
+	if (parm->parm.capture.capturemode != 0)
+		return -EINVAL;
+
+	n = go->sensor_framerate *
+		parm->parm.capture.timeperframe.numerator;
+	d = 1001 * parm->parm.capture.timeperframe.denominator;
+	if (n != 0 && d != 0 && n > d)
+		go->fps_scale = (n + d/2) / d;
+	else
+		go->fps_scale = 1;
+
+	return 0;
+}
+
+/* VIDIOC_ENUMSTD on go7007 were used for enumberating the supported fps and
+   its resolution, when the device is not connected to TV.
+   This were an API abuse, probably used by the lack of specific IOCTL's to
+   enumberate it, by the time the driver were written.
+
+   However, since kernel 2.6.19, two new ioctls (VIDIOC_ENUM_FRAMEINTERVALS
+   and VIDIOC_ENUM_FRAMESIZES) were added for this purpose.
+
+   The two functions bellow implements the newer ioctls
+*/
+
+static int vidioc_enum_framesizes(struct file *filp, void *priv,
+				  struct v4l2_frmsizeenum *fsize)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+
+	/* Return -EINVAL, if it is a TV board */
+	if ((go->board_info->flags & GO7007_BOARD_HAS_TUNER) ||
+	    (go->board_info->sensor_flags & GO7007_SENSOR_TV))
+		return -EINVAL;
+
+	if (fsize->index > 0)
+		return -EINVAL;
+
+	fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
+	fsize->discrete.width = go->board_info->sensor_width;
+	fsize->discrete.height = go->board_info->sensor_height;
+
+	return 0;
+}
+
+static int vidioc_enum_frameintervals(struct file *filp, void *priv,
+				      struct v4l2_frmivalenum *fival)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+
+	/* Return -EINVAL, if it is a TV board */
+	if ((go->board_info->flags & GO7007_BOARD_HAS_TUNER) ||
+	    (go->board_info->sensor_flags & GO7007_SENSOR_TV))
+		return -EINVAL;
+
+	if (fival->index > 0)
+		return -EINVAL;
+
+	fival->type = V4L2_FRMIVAL_TYPE_DISCRETE;
+	fival->discrete.numerator = 1001;
+	fival->discrete.denominator = go->board_info->sensor_framerate;
+
+	return 0;
+}
+
+static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *std)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+
+	if (go->streaming)
+		return -EBUSY;
+
+	if (!(go->board_info->sensor_flags & GO7007_SENSOR_TV) &&
+			*std != 0)
+		return -EINVAL;
+
+	if (*std == 0)
+		return -EINVAL;
+
+	if ((go->board_info->flags & GO7007_BOARD_HAS_TUNER) &&
+			go->input == go->board_info->num_inputs - 1) {
+		if (!go->i2c_adapter_online)
+			return -EIO;
+		i2c_clients_command(&go->i2c_adapter,
+					VIDIOC_S_STD, std);
+		if (!*std) /* hack to indicate EINVAL from tuner */
 			return -EINVAL;
-		if (go->i2c_adapter_online)
-			i2c_clients_command(&go->i2c_adapter,
-					    VIDIOC_S_STD, std);
-		set_capture_size(go, NULL, 0);
-		return 0;
 	}
+
+	if (*std & V4L2_STD_NTSC) {
+		go->standard = GO7007_STD_NTSC;
+		go->sensor_framerate = 30000;
+	} else if (*std & V4L2_STD_PAL) {
+		go->standard = GO7007_STD_PAL;
+		go->sensor_framerate = 25025;
+	} else if (*std & V4L2_STD_SECAM) {
+		go->standard = GO7007_STD_PAL;
+		go->sensor_framerate = 25025;
+	} else
+		return -EINVAL;
+
+	if (go->i2c_adapter_online)
+		i2c_clients_command(&go->i2c_adapter,
+					VIDIOC_S_STD, std);
+	set_capture_size(go, NULL, 0);
+
+	return 0;
+}
+
+#if 0
 	case VIDIOC_QUERYSTD:
 	{
 		v4l2_std_id *std = arg;
@@ -884,219 +969,269 @@ static int go7007_do_ioctl(struct inode *inode, struct file *file,
 			*std = 0;
 		return 0;
 	}
-	case VIDIOC_ENUMINPUT:
-	{
-		struct v4l2_input *inp = arg;
-		int index;
+#endif
 
-		if (inp->index >= go->board_info->num_inputs)
-			return -EINVAL;
-		index = inp->index;
-		memset(inp, 0, sizeof(*inp));
-		inp->index = index;
-		strncpy(inp->name, go->board_info->inputs[index].name,
-				sizeof(inp->name));
-		/* If this board has a tuner, it will be the last input */
-		if ((go->board_info->flags & GO7007_BOARD_HAS_TUNER) &&
-				index == go->board_info->num_inputs - 1)
-			inp->type = V4L2_INPUT_TYPE_TUNER;
-		else
-			inp->type = V4L2_INPUT_TYPE_CAMERA;
-		inp->audioset = 0;
-		inp->tuner = 0;
-		if (go->board_info->sensor_flags & GO7007_SENSOR_TV)
-			inp->std = V4L2_STD_NTSC | V4L2_STD_PAL |
-							V4L2_STD_SECAM;
-		else
-			inp->std = 0;
-		return 0;
-	}
-	case VIDIOC_G_INPUT:
-	{
-		int *input = arg;
+static int vidioc_enum_input(struct file *file, void *priv,
+				struct v4l2_input *inp)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
 
-		*input = go->input;
-		return 0;
-	}
-	case VIDIOC_S_INPUT:
-	{
-		int *input = arg;
+	if (inp->index >= go->board_info->num_inputs)
+		return -EINVAL;
 
-		if (*input >= go->board_info->num_inputs)
-			return -EINVAL;
-		if (go->streaming)
-			return -EBUSY;
-		go->input = *input;
-		if (go->i2c_adapter_online) {
-			i2c_clients_command(&go->i2c_adapter, VIDIOC_S_INPUT,
-				&go->board_info->inputs[*input].video_input);
-			i2c_clients_command(&go->i2c_adapter, VIDIOC_S_AUDIO,
-				&go->board_info->inputs[*input].audio_input);
-		}
-		return 0;
-	}
-	case VIDIOC_G_TUNER:
-	{
-		struct v4l2_tuner *t = arg;
+	strncpy(inp->name, go->board_info->inputs[inp->index].name,
+			sizeof(inp->name));
 
-		if (!(go->board_info->flags & GO7007_BOARD_HAS_TUNER))
-			return -EINVAL;
-		if (t->index != 0)
-			return -EINVAL;
-		if (!go->i2c_adapter_online)
-			return -EIO;
-		i2c_clients_command(&go->i2c_adapter, VIDIOC_G_TUNER, arg);
-		t->index = 0;
-		return 0;
-	}
-	case VIDIOC_S_TUNER:
-	{
-		struct v4l2_tuner *t = arg;
+	/* If this board has a tuner, it will be the last input */
+	if ((go->board_info->flags & GO7007_BOARD_HAS_TUNER) &&
+			inp->index == go->board_info->num_inputs - 1)
+		inp->type = V4L2_INPUT_TYPE_TUNER;
+	else
+		inp->type = V4L2_INPUT_TYPE_CAMERA;
 
-		if (!(go->board_info->flags & GO7007_BOARD_HAS_TUNER))
-			return -EINVAL;
-		if (t->index != 0)
-			return -EINVAL;
-		if (!go->i2c_adapter_online)
-			return -EIO;
-		switch (go->board_id) {
-		case GO7007_BOARDID_PX_TV402U_NA:
-		case GO7007_BOARDID_PX_TV402U_JP:
-			/* No selectable options currently */
-			if (t->audmode != V4L2_TUNER_MODE_STEREO)
-				return -EINVAL;
-			break;
-		}
-		i2c_clients_command(&go->i2c_adapter, VIDIOC_S_TUNER, arg);
-		return 0;
-	}
-	case VIDIOC_G_FREQUENCY:
-	{
-		struct v4l2_frequency *f = arg;
+	inp->audioset = 0;
+	inp->tuner = 0;
+	if (go->board_info->sensor_flags & GO7007_SENSOR_TV)
+		inp->std = V4L2_STD_NTSC | V4L2_STD_PAL |
+						V4L2_STD_SECAM;
+	else
+		inp->std = 0;
 
-		if (!(go->board_info->flags & GO7007_BOARD_HAS_TUNER))
-			return -EINVAL;
-		if (!go->i2c_adapter_online)
-			return -EIO;
-		memset(f, 0, sizeof(*f));
-		f->type = V4L2_TUNER_ANALOG_TV;
-		i2c_clients_command(&go->i2c_adapter, VIDIOC_G_FREQUENCY, arg);
-		return 0;
-	}
-	case VIDIOC_S_FREQUENCY:
-	{
-		if (!(go->board_info->flags & GO7007_BOARD_HAS_TUNER))
-			return -EINVAL;
-		if (!go->i2c_adapter_online)
-			return -EIO;
-		i2c_clients_command(&go->i2c_adapter, VIDIOC_S_FREQUENCY, arg);
-		return 0;
-	}
-	case VIDIOC_CROPCAP:
-	{
-		struct v4l2_cropcap *cropcap = arg;
+	return 0;
+}
 
-		if (cropcap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-			return -EINVAL;
-		memset(cropcap, 0, sizeof(*cropcap));
-		cropcap->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-		/* These specify the raw input of the sensor */
-		switch (go->standard) {
-		case GO7007_STD_NTSC:
-			cropcap->bounds.top = 0;
-			cropcap->bounds.left = 0;
-			cropcap->bounds.width = 720;
-			cropcap->bounds.height = 480;
-			cropcap->defrect.top = 0;
-			cropcap->defrect.left = 0;
-			cropcap->defrect.width = 720;
-			cropcap->defrect.height = 480;
-			break;
-		case GO7007_STD_PAL:
-			cropcap->bounds.top = 0;
-			cropcap->bounds.left = 0;
-			cropcap->bounds.width = 720;
-			cropcap->bounds.height = 576;
-			cropcap->defrect.top = 0;
-			cropcap->defrect.left = 0;
-			cropcap->defrect.width = 720;
-			cropcap->defrect.height = 576;
-			break;
-		case GO7007_STD_OTHER:
-			cropcap->bounds.top = 0;
-			cropcap->bounds.left = 0;
-			cropcap->bounds.width = go->board_info->sensor_width;
-			cropcap->bounds.height = go->board_info->sensor_height;
-			cropcap->defrect.top = 0;
-			cropcap->defrect.left = 0;
-			cropcap->defrect.width = go->board_info->sensor_width;
-			cropcap->defrect.height = go->board_info->sensor_height;
-			break;
-		}
 
-		return 0;
-	}
-	case VIDIOC_G_CROP:
-	{
-		struct v4l2_crop *crop = arg;
+static int vidioc_g_input(struct file *file, void *priv, unsigned int *input)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
 
-		if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
-			return -EINVAL;
-		memset(crop, 0, sizeof(*crop));
-		crop->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
-		/* These specify the raw input of the sensor */
-		switch (go->standard) {
-		case GO7007_STD_NTSC:
-			crop->c.top = 0;
-			crop->c.left = 0;
-			crop->c.width = 720;
-			crop->c.height = 480;
-			break;
-		case GO7007_STD_PAL:
-			crop->c.top = 0;
-			crop->c.left = 0;
-			crop->c.width = 720;
-			crop->c.height = 576;
-			break;
-		case GO7007_STD_OTHER:
-			crop->c.top = 0;
-			crop->c.left = 0;
-			crop->c.width = go->board_info->sensor_width;
-			crop->c.height = go->board_info->sensor_height;
-			break;
-		}
+	*input = go->input;
 
-		return 0;
+	return 0;
+}
+
+static int vidioc_s_input(struct file *file, void *priv, unsigned int input)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+
+	if (input >= go->board_info->num_inputs)
+		return -EINVAL;
+	if (go->streaming)
+		return -EBUSY;
+
+	go->input = input;
+	if (go->i2c_adapter_online) {
+		i2c_clients_command(&go->i2c_adapter, VIDIOC_S_INPUT,
+			&go->board_info->inputs[input].video_input);
+		i2c_clients_command(&go->i2c_adapter, VIDIOC_S_AUDIO,
+			&go->board_info->inputs[input].audio_input);
 	}
-	case VIDIOC_S_CROP:
-	{
-		struct v4l2_crop *crop = arg;
 
-		if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+	return 0;
+}
+
+static int vidioc_g_tuner(struct file *file, void *priv,
+				struct v4l2_tuner *t)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+
+	if (!(go->board_info->flags & GO7007_BOARD_HAS_TUNER))
+		return -EINVAL;
+	if (t->index != 0)
+		return -EINVAL;
+	if (!go->i2c_adapter_online)
+		return -EIO;
+
+	i2c_clients_command(&go->i2c_adapter, VIDIOC_G_TUNER, t);
+
+	t->index = 0;
+	return 0;
+}
+
+static int vidioc_s_tuner(struct file *file, void *priv,
+				struct v4l2_tuner *t)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+
+	if (!(go->board_info->flags & GO7007_BOARD_HAS_TUNER))
+		return -EINVAL;
+	if (t->index != 0)
+		return -EINVAL;
+	if (!go->i2c_adapter_online)
+		return -EIO;
+
+	switch (go->board_id) {
+	case GO7007_BOARDID_PX_TV402U_NA:
+	case GO7007_BOARDID_PX_TV402U_JP:
+		/* No selectable options currently */
+		if (t->audmode != V4L2_TUNER_MODE_STEREO)
 			return -EINVAL;
-		return 0;
+		break;
 	}
-	case VIDIOC_G_JPEGCOMP:
-	{
-		struct v4l2_jpegcompression *params = arg;
 
-		memset(params, 0, sizeof(*params));
-		params->quality = 50; /* ?? */
-		params->jpeg_markers = V4L2_JPEG_MARKER_DHT |
-					V4L2_JPEG_MARKER_DQT;
+	i2c_clients_command(&go->i2c_adapter, VIDIOC_S_TUNER, t);
 
-		return 0;
+	return 0;
+}
+
+static int vidioc_g_frequency(struct file *file, void *priv,
+				struct v4l2_frequency *f)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+
+	if (!(go->board_info->flags & GO7007_BOARD_HAS_TUNER))
+		return -EINVAL;
+	if (!go->i2c_adapter_online)
+		return -EIO;
+
+	f->type = V4L2_TUNER_ANALOG_TV;
+	i2c_clients_command(&go->i2c_adapter, VIDIOC_G_FREQUENCY, f);
+	return 0;
+}
+
+static int vidioc_s_frequency(struct file *file, void *priv,
+				struct v4l2_frequency *f)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+
+	if (!(go->board_info->flags & GO7007_BOARD_HAS_TUNER))
+		return -EINVAL;
+	if (!go->i2c_adapter_online)
+		return -EIO;
+
+	i2c_clients_command(&go->i2c_adapter, VIDIOC_S_FREQUENCY, f);
+
+	return 0;
+}
+
+static int vidioc_cropcap(struct file *file, void *priv,
+					struct v4l2_cropcap *cropcap)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+
+	if (cropcap->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+		return -EINVAL;
+
+	/* These specify the raw input of the sensor */
+	switch (go->standard) {
+	case GO7007_STD_NTSC:
+		cropcap->bounds.top = 0;
+		cropcap->bounds.left = 0;
+		cropcap->bounds.width = 720;
+		cropcap->bounds.height = 480;
+		cropcap->defrect.top = 0;
+		cropcap->defrect.left = 0;
+		cropcap->defrect.width = 720;
+		cropcap->defrect.height = 480;
+		break;
+	case GO7007_STD_PAL:
+		cropcap->bounds.top = 0;
+		cropcap->bounds.left = 0;
+		cropcap->bounds.width = 720;
+		cropcap->bounds.height = 576;
+		cropcap->defrect.top = 0;
+		cropcap->defrect.left = 0;
+		cropcap->defrect.width = 720;
+		cropcap->defrect.height = 576;
+		break;
+	case GO7007_STD_OTHER:
+		cropcap->bounds.top = 0;
+		cropcap->bounds.left = 0;
+		cropcap->bounds.width = go->board_info->sensor_width;
+		cropcap->bounds.height = go->board_info->sensor_height;
+		cropcap->defrect.top = 0;
+		cropcap->defrect.left = 0;
+		cropcap->defrect.width = go->board_info->sensor_width;
+		cropcap->defrect.height = go->board_info->sensor_height;
+		break;
 	}
-	case VIDIOC_S_JPEGCOMP:
-	{
-		struct v4l2_jpegcompression *params = arg;
 
-		if (params->quality != 50 ||
-				params->jpeg_markers != (V4L2_JPEG_MARKER_DHT |
-							V4L2_JPEG_MARKER_DQT))
-			return -EINVAL;
-		return 0;
+	return 0;
+}
+
+static int vidioc_g_crop(struct file *file, void *priv, struct v4l2_crop *crop)
+{
+	struct go7007_file *gofh = priv;
+	struct go7007 *go = gofh->go;
+
+	if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+		return -EINVAL;
+
+	crop->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
+
+	/* These specify the raw input of the sensor */
+	switch (go->standard) {
+	case GO7007_STD_NTSC:
+		crop->c.top = 0;
+		crop->c.left = 0;
+		crop->c.width = 720;
+		crop->c.height = 480;
+		break;
+	case GO7007_STD_PAL:
+		crop->c.top = 0;
+		crop->c.left = 0;
+		crop->c.width = 720;
+		crop->c.height = 576;
+		break;
+	case GO7007_STD_OTHER:
+		crop->c.top = 0;
+		crop->c.left = 0;
+		crop->c.width = go->board_info->sensor_width;
+		crop->c.height = go->board_info->sensor_height;
+		break;
 	}
+
+	return 0;
+}
+
+/* FIXME: vidioc_s_crop is not really implemented!!!
+ */
+static int vidioc_s_crop(struct file *file, void *priv, struct v4l2_crop *crop)
+{
+	if (crop->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
+		return -EINVAL;
+
+	return 0;
+}
+
+static int vidioc_g_jpegcomp(struct file *file, void *priv,
+			 struct v4l2_jpegcompression *params)
+{
+	memset(params, 0, sizeof(*params));
+	params->quality = 50; /* ?? */
+	params->jpeg_markers = V4L2_JPEG_MARKER_DHT |
+				V4L2_JPEG_MARKER_DQT;
+
+	return 0;
+}
+
+static int vidioc_s_jpegcomp(struct file *file, void *priv,
+			 struct v4l2_jpegcompression *params)
+{
+	if (params->quality != 50 ||
+			params->jpeg_markers != (V4L2_JPEG_MARKER_DHT |
+						V4L2_JPEG_MARKER_DQT))
+		return -EINVAL;
+
+	return 0;
+}
+
+/* FIXME:
+	Those ioctls are private, and not needed, since several standard
+	extended controls already provide streaming control.
+	So, those ioctls should be converted into vidioc_g_ext_ctrls()
+	and vidioc_s_ext_ctrls()
+ */
+
+#if 0
 	/* Temporary ioctls for controlling compression characteristics */
 	case GO7007IOC_S_BITRATE:
 	{
@@ -1316,27 +1451,7 @@ static int go7007_do_ioctl(struct inode *inode, struct file *file,
 			return -EINVAL;
 		return clip_to_modet_map(go, region->region, region->clips);
 	}
-	default:
-		printk(KERN_DEBUG "go7007: unsupported ioctl %d\n", cmd);
-		return -ENOIOCTLCMD;
-	}
-	return 0;
-
-unlock_and_return:
-	up(&gofh->lock);
-	return retval;
-}
-
-static int go7007_ioctl(struct inode *inode, struct file *file,
-		unsigned int cmd, unsigned long arg)
-{
-	struct go7007_file *gofh = file->private_data;
-
-	if (gofh->go->status != STATUS_ONLINE)
-		return -EIO;
-
-	return video_usercopy(inode, file, cmd, arg, go7007_do_ioctl);
-}
+#endif
 
 static ssize_t go7007_read(struct file *file, char __user *data,
 		size_t count, loff_t *ppos)
@@ -1445,19 +1560,56 @@ static struct file_operations go7007_fops = {
 	.owner		= THIS_MODULE,
 	.open		= go7007_open,
 	.release	= go7007_release,
-	.ioctl		= go7007_ioctl,
+	.ioctl		= video_ioctl2,
 	.llseek		= no_llseek,
 	.read		= go7007_read,
 	.mmap		= go7007_mmap,
 	.poll		= go7007_poll,
 };
 
+static const struct v4l2_ioctl_ops video_ioctl_ops = {
+	.vidioc_querycap          = vidioc_querycap,
+	.vidioc_enum_fmt_vid_cap  = vidioc_enum_fmt_vid_cap,
+	.vidioc_g_fmt_vid_cap     = vidioc_g_fmt_vid_cap,
+	.vidioc_try_fmt_vid_cap   = vidioc_try_fmt_vid_cap,
+	.vidioc_s_fmt_vid_cap     = vidioc_s_fmt_vid_cap,
+	.vidioc_reqbufs           = vidioc_reqbufs,
+	.vidioc_querybuf          = vidioc_querybuf,
+	.vidioc_qbuf              = vidioc_qbuf,
+	.vidioc_dqbuf             = vidioc_dqbuf,
+	.vidioc_s_std             = vidioc_s_std,
+	.vidioc_enum_input        = vidioc_enum_input,
+	.vidioc_g_input           = vidioc_g_input,
+	.vidioc_s_input           = vidioc_s_input,
+	.vidioc_queryctrl         = vidioc_queryctrl,
+	.vidioc_g_ctrl            = vidioc_g_ctrl,
+	.vidioc_s_ctrl            = vidioc_s_ctrl,
+	.vidioc_streamon          = vidioc_streamon,
+	.vidioc_streamoff         = vidioc_streamoff,
+	.vidioc_g_tuner           = vidioc_g_tuner,
+	.vidioc_s_tuner           = vidioc_s_tuner,
+	.vidioc_g_frequency       = vidioc_g_frequency,
+	.vidioc_s_frequency       = vidioc_s_frequency,
+	.vidioc_g_parm            = vidioc_g_parm,
+	.vidioc_s_parm            = vidioc_s_parm,
+	.vidioc_enum_framesizes   = vidioc_enum_framesizes,
+	.vidioc_enum_frameintervals = vidioc_enum_frameintervals,
+	.vidioc_cropcap           = vidioc_cropcap,
+	.vidioc_g_crop            = vidioc_g_crop,
+	.vidioc_s_crop            = vidioc_s_crop,
+	.vidioc_g_jpegcomp        = vidioc_g_jpegcomp,
+	.vidioc_s_jpegcomp        = vidioc_s_jpegcomp,
+};
+
 static struct video_device go7007_template = {
 	.name		= "go7007",
 	.vfl_type	= VID_TYPE_CAPTURE,
 	.fops		= &go7007_fops,
 	.minor		= -1,
 	.release	= go7007_vfl_release,
+	.ioctl_ops	= &video_ioctl_ops,
+	.tvnorms	= V4L2_STD_ALL,
+	.current_norm	= V4L2_STD_NTSC,
 };
 
 int go7007_v4l2_init(struct go7007 *go)

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

* Re: linux-next: v4l-dvb tree build failure
  2008-11-08  4:38       ` Greg KH
@ 2008-11-08  5:08         ` Greg KH
  0 siblings, 0 replies; 41+ messages in thread
From: Greg KH @ 2008-11-08  5:08 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Stephen Rothwell, Harvey Harrison, Mauro Carvalho Chehab,
	linux-next, Hans Verkuil

On Fri, Nov 07, 2008 at 08:38:16PM -0800, Greg KH wrote:
> On Sat, Nov 08, 2008 at 04:05:35AM +0100, Sam Ravnborg wrote:
> > On Sat, Nov 08, 2008 at 09:59:50AM +1100, Stephen Rothwell wrote:
> > > Hi Harvey,
> > > 
> > > On Fri, 07 Nov 2008 09:43:57 -0800 Harvey Harrison <harvey.harrison@gmail.com> wrote:
> > > >
> > > > Is it really fair to drop the v4l tree when it was -staging that broke?  I'd humbly
> > > > suggest that staging be weighted somewhat lower than the other trees.
> > > 
> > > There is no staging tree in linux-next, that driver is in Linus' tree.  I
> > > agree that if there was a staging tree, it would be much lower priority.
> > > 
> > > Maybe we need some way to exclude the staging directory from
> > > all{yes,mod}config builds ...
> > 
> > That is simple to do. Something like:
> > 
> > config STAGING_EXCLUDE_BUILD
> > 	bool "Exclude Staging from the build"
> > 
> > 
> > And test for this in the Staging Makefile
> > 
> > When this is set to 'y' then we will not build
> > the staging tree.
> 
> While that would work, it does seem odd to be asked two things:
>   "Staging drivers (y/N)"
> if Y is chosen, they then get asked:
>   "Exclude Staging from the build? (Y/n)"
> 
> It's like, "are you sure you really want to build this part of the
> tree?"  If that would make people's lives easier, I have no objection to
> it, it's just kind of funny :)
> 
> Stephen, what do you think?

In thinking about it a bit more, I kind of like it.  So here's the patch
I just added to the staging tree:

---
 drivers/staging/Kconfig |   20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -21,7 +21,23 @@ menuconfig STAGING
 
 	  If in doubt, say N here.
 
-if STAGING
+
+config STAGING_EXCLUDE_BUILD
+	bool "Exclude Staging drivers from being built"
+	default y
+	---help---
+	  Are you sure you really want to build the staging drivers?
+	  They taint your kernel, don't live up to the normal Linux
+	  kernel quality standards, are a bit crufty around the edges,
+	  and might go off and kick your dog when you aren't paying
+	  attention.
+
+	  Say N here to be able to select and build the Staging drivers.
+	  This option is primarily here to prevent them from being built
+	  when selecting 'make allyesconfg' and 'make allmodconfig' so
+	  don't be all that put off, your dog will be just fine.
+
+if !STAGING_EXCLUDE_BUILD
 
 source "drivers/staging/et131x/Kconfig"
 
@@ -59,4 +75,4 @@ source "drivers/staging/comedi/Kconfig"
 
 source "drivers/staging/asus_oled/Kconfig"
 
-endif # STAGING
+endif # !STAGING_EXCLUDE_BUILD

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

* Re: linux-next: v4l-dvb tree build failure
  2008-11-08  3:05     ` Sam Ravnborg
@ 2008-11-08  4:38       ` Greg KH
  2008-11-08  5:08         ` Greg KH
  0 siblings, 1 reply; 41+ messages in thread
From: Greg KH @ 2008-11-08  4:38 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Stephen Rothwell, Harvey Harrison, Mauro Carvalho Chehab,
	linux-next, Hans Verkuil

On Sat, Nov 08, 2008 at 04:05:35AM +0100, Sam Ravnborg wrote:
> On Sat, Nov 08, 2008 at 09:59:50AM +1100, Stephen Rothwell wrote:
> > Hi Harvey,
> > 
> > On Fri, 07 Nov 2008 09:43:57 -0800 Harvey Harrison <harvey.harrison@gmail.com> wrote:
> > >
> > > Is it really fair to drop the v4l tree when it was -staging that broke?  I'd humbly
> > > suggest that staging be weighted somewhat lower than the other trees.
> > 
> > There is no staging tree in linux-next, that driver is in Linus' tree.  I
> > agree that if there was a staging tree, it would be much lower priority.
> > 
> > Maybe we need some way to exclude the staging directory from
> > all{yes,mod}config builds ...
> 
> That is simple to do. Something like:
> 
> config STAGING_EXCLUDE_BUILD
> 	bool "Exclude Staging from the build"
> 
> 
> And test for this in the Staging Makefile
> 
> When this is set to 'y' then we will not build
> the staging tree.

While that would work, it does seem odd to be asked two things:
  "Staging drivers (y/N)"
if Y is chosen, they then get asked:
  "Exclude Staging from the build? (Y/n)"

It's like, "are you sure you really want to build this part of the
tree?"  If that would make people's lives easier, I have no objection to
it, it's just kind of funny :)

Stephen, what do you think?

thanks,

greg k-h

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

* Re: linux-next: v4l-dvb tree build failure
  2008-11-07 22:59   ` Stephen Rothwell
  2008-11-07 23:06     ` Greg KH
@ 2008-11-08  3:05     ` Sam Ravnborg
  2008-11-08  4:38       ` Greg KH
  1 sibling, 1 reply; 41+ messages in thread
From: Sam Ravnborg @ 2008-11-08  3:05 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Harvey Harrison, Mauro Carvalho Chehab, linux-next, Hans Verkuil,
	Greg KH

On Sat, Nov 08, 2008 at 09:59:50AM +1100, Stephen Rothwell wrote:
> Hi Harvey,
> 
> On Fri, 07 Nov 2008 09:43:57 -0800 Harvey Harrison <harvey.harrison@gmail.com> wrote:
> >
> > Is it really fair to drop the v4l tree when it was -staging that broke?  I'd humbly
> > suggest that staging be weighted somewhat lower than the other trees.
> 
> There is no staging tree in linux-next, that driver is in Linus' tree.  I
> agree that if there was a staging tree, it would be much lower priority.
> 
> Maybe we need some way to exclude the staging directory from
> all{yes,mod}config builds ...

That is simple to do. Something like:

config STAGING_EXCLUDE_BUILD
	bool "Exclude Staging from the build"


And test for this in the Staging Makefile

When this is set to 'y' then we will not build
the staging tree.

	Sam

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

* Re: linux-next: v4l-dvb tree build failure
  2008-11-07 22:59   ` Stephen Rothwell
@ 2008-11-07 23:06     ` Greg KH
  2008-11-08  3:05     ` Sam Ravnborg
  1 sibling, 0 replies; 41+ messages in thread
From: Greg KH @ 2008-11-07 23:06 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Harvey Harrison, Mauro Carvalho Chehab, linux-next, Hans Verkuil,
	Sam Ravnborg

On Sat, Nov 08, 2008 at 09:59:50AM +1100, Stephen Rothwell wrote:
> Hi Harvey,
> 
> On Fri, 07 Nov 2008 09:43:57 -0800 Harvey Harrison <harvey.harrison@gmail.com> wrote:
> >
> > Is it really fair to drop the v4l tree when it was -staging that broke?  I'd humbly
> > suggest that staging be weighted somewhat lower than the other trees.
> 
> There is no staging tree in linux-next, that driver is in Linus' tree.  I
> agree that if there was a staging tree, it would be much lower priority.
> 
> Maybe we need some way to exclude the staging directory from
> all{yes,mod}config builds ...

Ah, ok, that makes more sense.

thanks,

greg k-h

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

* Re: linux-next: v4l-dvb tree build failure
  2008-11-07 18:41   ` Greg KH
@ 2008-11-07 23:02     ` Stephen Rothwell
  2008-11-12  0:54     ` Mauro Carvalho Chehab
  1 sibling, 0 replies; 41+ messages in thread
From: Stephen Rothwell @ 2008-11-07 23:02 UTC (permalink / raw)
  To: Greg KH; +Cc: Harvey Harrison, Mauro Carvalho Chehab, linux-next, Hans Verkuil

[-- Attachment #1: Type: text/plain, Size: 405 bytes --]

Hi Greg,

On Fri, 7 Nov 2008 10:41:48 -0800 Greg KH <greg@kroah.com> wrote:
>
> I agree, please always drop the staging tree, not any "real" tree :)

As I said to Harvey, there is no staging tree in linux-next.  I would
have to drop Linus' tree which really defeats the whole purpose :-)

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2008-11-07 17:43 ` Harvey Harrison
  2008-11-07 18:41   ` Greg KH
@ 2008-11-07 22:59   ` Stephen Rothwell
  2008-11-07 23:06     ` Greg KH
  2008-11-08  3:05     ` Sam Ravnborg
  1 sibling, 2 replies; 41+ messages in thread
From: Stephen Rothwell @ 2008-11-07 22:59 UTC (permalink / raw)
  To: Harvey Harrison
  Cc: Mauro Carvalho Chehab, linux-next, Hans Verkuil, Greg KH, Sam Ravnborg

[-- Attachment #1: Type: text/plain, Size: 619 bytes --]

Hi Harvey,

On Fri, 07 Nov 2008 09:43:57 -0800 Harvey Harrison <harvey.harrison@gmail.com> wrote:
>
> Is it really fair to drop the v4l tree when it was -staging that broke?  I'd humbly
> suggest that staging be weighted somewhat lower than the other trees.

There is no staging tree in linux-next, that driver is in Linus' tree.  I
agree that if there was a staging tree, it would be much lower priority.

Maybe we need some way to exclude the staging directory from
all{yes,mod}config builds ...

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2008-11-07 17:43 ` Harvey Harrison
@ 2008-11-07 18:41   ` Greg KH
  2008-11-07 23:02     ` Stephen Rothwell
  2008-11-12  0:54     ` Mauro Carvalho Chehab
  2008-11-07 22:59   ` Stephen Rothwell
  1 sibling, 2 replies; 41+ messages in thread
From: Greg KH @ 2008-11-07 18:41 UTC (permalink / raw)
  To: Harvey Harrison
  Cc: Stephen Rothwell, Mauro Carvalho Chehab, linux-next, Hans Verkuil

On Fri, Nov 07, 2008 at 09:43:57AM -0800, Harvey Harrison wrote:
> On Fri, 2008-11-07 at 14:30 +1100, Stephen Rothwell wrote:
> > Hi Mauro,
> > 
> > Today's linux-next build (x86_64 allmodconfig) failed like this:
> > 
> > drivers/staging/go7007/go7007-v4l2.c: In function 'go7007_ioctl':
> > drivers/staging/go7007/go7007-v4l2.c:1338: warning: passing argument 1 of 'video_usercopy' from incompatible pointer type
> > drivers/staging/go7007/go7007-v4l2.c:1338: warning: passing argument 2 of 'video_usercopy' makes integer from pointer without a cast
> > drivers/staging/go7007/go7007-v4l2.c:1338: warning: passing argument 4 of 'video_usercopy' makes pointer from integer without a cast
> > drivers/staging/go7007/go7007-v4l2.c:1338: error: too many arguments to function 'video_usercopy'
> > 
> > Caused by commit 579209181bfc24ee03a0d167bdc32106afd4e269 ("V4L/DVB
> > (9503): v4l: remove inode argument from video_usercopy") which missed the
> > above driver.
> > 
> > I have dropped your tree again for today.
> 
> Is it really fair to drop the v4l tree when it was -staging that broke?  I'd humbly
> suggest that staging be weighted somewhat lower than the other trees.

I agree, please always drop the staging tree, not any "real" tree :)

thanks,

greg k-h

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

* Re: linux-next: v4l-dvb tree build failure
  2008-11-07  3:30 Stephen Rothwell
@ 2008-11-07 17:43 ` Harvey Harrison
  2008-11-07 18:41   ` Greg KH
  2008-11-07 22:59   ` Stephen Rothwell
  0 siblings, 2 replies; 41+ messages in thread
From: Harvey Harrison @ 2008-11-07 17:43 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Mauro Carvalho Chehab, linux-next, Hans Verkuil, Greg KH

On Fri, 2008-11-07 at 14:30 +1100, Stephen Rothwell wrote:
> Hi Mauro,
> 
> Today's linux-next build (x86_64 allmodconfig) failed like this:
> 
> drivers/staging/go7007/go7007-v4l2.c: In function 'go7007_ioctl':
> drivers/staging/go7007/go7007-v4l2.c:1338: warning: passing argument 1 of 'video_usercopy' from incompatible pointer type
> drivers/staging/go7007/go7007-v4l2.c:1338: warning: passing argument 2 of 'video_usercopy' makes integer from pointer without a cast
> drivers/staging/go7007/go7007-v4l2.c:1338: warning: passing argument 4 of 'video_usercopy' makes pointer from integer without a cast
> drivers/staging/go7007/go7007-v4l2.c:1338: error: too many arguments to function 'video_usercopy'
> 
> Caused by commit 579209181bfc24ee03a0d167bdc32106afd4e269 ("V4L/DVB
> (9503): v4l: remove inode argument from video_usercopy") which missed the
> above driver.
> 
> I have dropped your tree again for today.

Is it really fair to drop the v4l tree when it was -staging that broke?  I'd humbly
suggest that staging be weighted somewhat lower than the other trees.

Cheers,

Harvey

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

* linux-next: v4l-dvb tree build failure
@ 2008-11-07  3:30 Stephen Rothwell
  2008-11-07 17:43 ` Harvey Harrison
  0 siblings, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2008-11-07  3:30 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, Hans Verkuil

[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

Hi Mauro,

Today's linux-next build (x86_64 allmodconfig) failed like this:

drivers/staging/go7007/go7007-v4l2.c: In function 'go7007_ioctl':
drivers/staging/go7007/go7007-v4l2.c:1338: warning: passing argument 1 of 'video_usercopy' from incompatible pointer type
drivers/staging/go7007/go7007-v4l2.c:1338: warning: passing argument 2 of 'video_usercopy' makes integer from pointer without a cast
drivers/staging/go7007/go7007-v4l2.c:1338: warning: passing argument 4 of 'video_usercopy' makes pointer from integer without a cast
drivers/staging/go7007/go7007-v4l2.c:1338: error: too many arguments to function 'video_usercopy'

Caused by commit 579209181bfc24ee03a0d167bdc32106afd4e269 ("V4L/DVB
(9503): v4l: remove inode argument from video_usercopy") which missed the
above driver.

I have dropped your tree again for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2008-11-03  1:52 ` Stephen Rothwell
@ 2008-11-05  1:57   ` Stephen Rothwell
  0 siblings, 0 replies; 41+ messages in thread
From: Stephen Rothwell @ 2008-11-05  1:57 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, Andreas Oberritter

[-- Attachment #1: Type: text/plain, Size: 875 bytes --]

HI Mauro,

On Mon, 3 Nov 2008 12:52:29 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Wed, 29 Oct 2008 13:20:11 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Today's linux-next build (x86_64 allmodconfig) failed like this:
> > drivers/media/dvb/dvb-core/dvbdev.c: In function 'dvb_register_device':
> > drivers/media/dvb/dvb-core/dvbdev.c:254: error: implicit declaration of function 'nums2minor'
> > 
> > Caused by commit f3d9182030d9655d9ffff33dfceb45b4a127b6ec ("V4L/DVB
> > (9361): Dynamic DVB minor allocation") which clearly has not even been
> > built with CONFIG_DVB_DYNAMIC_MINORS=y.
> 
> This is still happening today, so I have excluded the v4l-dvb tree for
> today.  Please get this fixed up.

And again ...

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2008-10-29  2:20 Stephen Rothwell
  2008-10-29 12:26 ` Andreas Oberritter
@ 2008-11-03  1:52 ` Stephen Rothwell
  2008-11-05  1:57   ` Stephen Rothwell
  1 sibling, 1 reply; 41+ messages in thread
From: Stephen Rothwell @ 2008-11-03  1:52 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, Andreas Oberritter

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

Hi Mauro,

On Wed, 29 Oct 2008 13:20:11 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next build (x86_64 allmodconfig) failed like this:
> drivers/media/dvb/dvb-core/dvbdev.c: In function 'dvb_register_device':
> drivers/media/dvb/dvb-core/dvbdev.c:254: error: implicit declaration of function 'nums2minor'
> 
> Caused by commit f3d9182030d9655d9ffff33dfceb45b4a127b6ec ("V4L/DVB
> (9361): Dynamic DVB minor allocation") which clearly has not even been
> built with CONFIG_DVB_DYNAMIC_MINORS=y.

This is still happening today, so I have excluded the v4l-dvb tree for
today.  Please get this fixed up.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: v4l-dvb tree build failure
  2008-10-29  2:20 Stephen Rothwell
@ 2008-10-29 12:26 ` Andreas Oberritter
  2008-11-03  1:52 ` Stephen Rothwell
  1 sibling, 0 replies; 41+ messages in thread
From: Andreas Oberritter @ 2008-10-29 12:26 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Mauro Carvalho Chehab, linux-next

Hello Stephen,

Stephen Rothwell wrote:
> Hi Mauro,
> 
> Today's linux-next build (x86_64 allmodconfig) failed like this:
> drivers/media/dvb/dvb-core/dvbdev.c: In function 'dvb_register_device':
> drivers/media/dvb/dvb-core/dvbdev.c:254: error: implicit declaration of function 'nums2minor'
> 
> Caused by commit f3d9182030d9655d9ffff33dfceb45b4a127b6ec ("V4L/DVB
> (9361): Dynamic DVB minor allocation") which clearly has not even been
> built with CONFIG_DVB_DYNAMIC_MINORS=y.
> 
> I applied the following patch.
> 
> More care required, please.

thank you! The error is hidden by #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 27)
in the v4l-dvb repository. That's why it didn't show up during testing.

Regards,
Andreas

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

* linux-next: v4l-dvb tree build failure
@ 2008-10-29  2:20 Stephen Rothwell
  2008-10-29 12:26 ` Andreas Oberritter
  2008-11-03  1:52 ` Stephen Rothwell
  0 siblings, 2 replies; 41+ messages in thread
From: Stephen Rothwell @ 2008-10-29  2:20 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-next, Andreas Oberritter

Hi Mauro,

Today's linux-next build (x86_64 allmodconfig) failed like this:
drivers/media/dvb/dvb-core/dvbdev.c: In function 'dvb_register_device':
drivers/media/dvb/dvb-core/dvbdev.c:254: error: implicit declaration of function 'nums2minor'

Caused by commit f3d9182030d9655d9ffff33dfceb45b4a127b6ec ("V4L/DVB
(9361): Dynamic DVB minor allocation") which clearly has not even been
built with CONFIG_DVB_DYNAMIC_MINORS=y.

I applied the following patch.

More care required, please.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 29 Oct 2008 13:16:19 +1100
Subject: [PATCH] v4l-dvb: fallout from DVB_DYNAMIC_MINORS addition

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/media/dvb/dvb-core/dvbdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c
index e363a3b..ebfd913 100644
--- a/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/drivers/media/dvb/dvb-core/dvbdev.c
@@ -251,7 +251,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
 	mutex_unlock(&dvbdev_register_lock);
 
 	clsdev = device_create(dvb_class, adap->device,
-			       MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
+			       MKDEV(DVB_MAJOR, minor),
 			       NULL, "dvb%d.%s%d", adap->num, dnames[type], id);
 	if (IS_ERR(clsdev)) {
 		printk(KERN_ERR "%s: failed to create device dvb%d.%s%d (%ld)\n",
-- 
1.5.6.5

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

end of thread, other threads:[~2010-01-28  5:24 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-07  0:58 linux-next: v4l-dvb tree build failure Stephen Rothwell
2009-04-07  1:20 ` Mauro Carvalho Chehab
2009-04-07  4:47   ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2010-01-27  6:59 Stephen Rothwell
2010-01-27 23:24 ` Andy Walls
2010-01-28  1:54   ` Mauro Carvalho Chehab
2010-01-28  5:24     ` Stephen Rothwell
2009-03-27  0:40 Stephen Rothwell
2009-03-27 11:28 ` Mauro Carvalho Chehab
2009-03-27 14:03   ` Stephen Rothwell
2009-03-05  0:35 Stephen Rothwell
2009-03-05 21:51 ` Mauro Carvalho Chehab
2009-03-06  0:05   ` Stephen Rothwell
2009-03-06  1:15     ` Mauro Carvalho Chehab
2009-03-02  0:05 Stephen Rothwell
2009-03-02  0:08 ` Michael Krufky
2009-03-02  0:30   ` Stephen Rothwell
2009-03-02  2:52     ` Mauro Carvalho Chehab
2008-12-08  2:07 Stephen Rothwell
2008-12-01 23:37 Stephen Rothwell
2008-12-02 10:03 ` Mauro Carvalho Chehab
2008-12-02 22:23   ` Stephen Rothwell
2008-12-03 22:48     ` Mauro Carvalho Chehab
2008-12-03  0:08   ` Stephen Rothwell
2008-12-03 22:49     ` Mauro Carvalho Chehab
2008-11-25  4:41 Stephen Rothwell
2008-11-07  3:30 Stephen Rothwell
2008-11-07 17:43 ` Harvey Harrison
2008-11-07 18:41   ` Greg KH
2008-11-07 23:02     ` Stephen Rothwell
2008-11-12  0:54     ` Mauro Carvalho Chehab
2008-11-12 22:45       ` Greg KH
2008-11-07 22:59   ` Stephen Rothwell
2008-11-07 23:06     ` Greg KH
2008-11-08  3:05     ` Sam Ravnborg
2008-11-08  4:38       ` Greg KH
2008-11-08  5:08         ` Greg KH
2008-10-29  2:20 Stephen Rothwell
2008-10-29 12:26 ` Andreas Oberritter
2008-11-03  1:52 ` Stephen Rothwell
2008-11-05  1:57   ` Stephen Rothwell

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).