Commit Graph

22 Commits

Author SHA1 Message Date
Jean Delvare 7400516ab4 go7007: Convert to the new i2c device binding model
Move the go7007 driver away from the legacy i2c binding model, which
is going away really soon now.

The I2C addresses of the audio and video chips in s2250-board didn't
look quite right, apparently they were left-aligned values when Linux
wants right-aligned values, so I fixed them too.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-21 21:47:22 +02:00
Greg Kroah-Hartman 86a79d2e70 Staging: go7007: fix build issues
Now that TUNER_SET_TYPE_ADDR is gone from the tree, the older code kicks
in and tries to use TUNER_SET_TYPE, which went away a long time ago.

This patch removes all of this logic, as it should not be needed anymore
now, and by doing so, fixes the build.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17 11:06:31 -07:00
Linus Torvalds 3516c6a8dc Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (714 commits)
  Staging: sxg: slicoss: Specify the license for Sahara SXG and Slicoss drivers
  Staging: serqt_usb: fix build due to proc tty changes
  Staging: serqt_usb: fix checkpatch errors
  Staging: serqt_usb: add TODO file
  Staging: serqt_usb: Lindent the code
  Staging: add USB serial Quatech driver
  staging: document that the wifi staging drivers a bit better
  Staging: echo cleanup
  Staging: BUG to BUG_ON changes
  Staging: remove some pointless conditionals before kfree_skb()
  Staging: line6: fix build error, select SND_RAWMIDI
  Staging: line6: fix checkpatch errors in variax.c
  Staging: line6: fix checkpatch errors in toneport.c
  Staging: line6: fix checkpatch errors in pcm.c
  Staging: line6: fix checkpatch errors in midibuf.c
  Staging: line6: fix checkpatch errors in midi.c
  Staging: line6: fix checkpatch errors in dumprequest.c
  Staging: line6: fix checkpatch errors in driver.c
  Staging: line6: fix checkpatch errors in audio.c
  Staging: line6: fix checkpatch errors in pod.c
  ...
2009-04-05 11:06:45 -07:00
Greg Kroah-Hartman c6f5af8843 Staging: go7007: fix build error
VID_TYPE_CAPTURE is a v4l1 thing only.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:27 -07:00
Julia Lawall 253d3b139a Staging: go7007: introduce missing kfree
Error handling code following a kmalloc should free the allocated data.

The semantic match that finds the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,l;
position p1,p2;
expression *ptr != NULL;
@@

(
if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...)) == NULL) S
|
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
)
<... when != x
     when != if (...) { <+...x...+> }
x->f = E
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:27 -07:00
Julia Lawall 41e847890a Staging: go7007: Move a dereference below a NULL test
In each case, if the NULL test is necessary, then the dereference should be
moved below the NULL test.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/).  The result has been modified to
move the initialization of usb down closer to where it is used.

// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@

- T i = E->fld;
+ T i;
  ... when != E
      when != i
  if (E == NULL) S
+ i = E->fld;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:27 -07:00
Matt LaPlante 692105b8ac trivial: fix typos/grammar errors in Kconfig texts
Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30 15:22:01 +02:00
Takashi Iwai 6ff1871617 drivers/staging: Convert to snd_card_create() for go7007
Convert from snd_card_new to the new snd_card_create() for go7007.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12 15:25:11 +01:00
Guennadi Liakhovetski c0cd5010e5 V4L/DVB (10176a): Switch remaining clear_user_page users over to clear_user_highpage
Not all architectures provide clear_user_page(), but clear_user_highpage()
is available everywhere at least via the compatibility inline function.

Is this the "trivial patch" that's required for these two drivers?

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-01-07 22:18:54 -02:00
Greg Kroah-Hartman 0484f2082a Staging: go7007: add some more v4l2 ioctls
Now that the v4l2 tree is merged with mainline, enable some of
the compiled out functions.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:07 -08:00
Oliver Neukum 9efb052563 Staging: go7007: small cleanup
small cleanup of go7007:

- prepare for urb->status conversion
- micro optimization
- use kzalloc
- fix free of memory in use in go7007_usb_disconnect

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: Cohen <rcohen@snurgle.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:07 -08:00
Greg Kroah-Hartman 8fca1cb3a4 Staging: go7007: fix minor build warnings
Comment out some functions that we aren't using yet, in anticipation
of using them when the v4l core merges are changed upstream.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:06 -08:00
Harvey Harrison 9febd042da Staging: go7007: annotate code pointers
They are treated as __le16 everywhere, annotate as such.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:06 -08:00
Mauro Carvalho Chehab 65f9f6190b Staging: go7007: Convert driver to use video_ioctl2
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:06 -08:00
Pete Eberlein b11869dbb6 Staging: go7007: add sensoray 2250/2251 support
This is the driver for the Sensoray 2250/2251 USB devices added to
go7007 driver.


Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:06 -08:00
Pete Eberlein d73f822ce7 Staging: go7007: saa7134 updates
- Added documentation including README files from the original go7007
  driver package.
- Added Video4Linux2 MPEG controls.
- Added Video4Linux2 audio ioctls, which pass thru to the i2c driver.
- Improved saa7134 interface, to pass thru controls and video settings.
- Fixed a bug in sony tuner, as reported by Bifferos on the Go7007 wiki.


Signed-off-by: Pete Eberlein <pete@sensoray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:06 -08:00
Greg Kroah-Hartman 60572c0d8b Staging: go7007: fixes due v4l2_file_operations api change
v4l2_file_operations was introduced, so use it to fix up
the build errors in the go7007 driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:38 -08:00
Greg Kroah-Hartman 4f7ddec223 Staging: go7007: fixes due to video_usercopy api change
video_usercopy() just changed its arguments, so fix up the go7007 driver
to properly build.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:51:37 -08:00
Huang Weiyi 2eb3882889 Staging: go7007: remove unused #include <version.h>
The file(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  drivers/staging/go7007/go7007-driver.c
  drivers/staging/go7007/go7007-fw.c
  drivers/staging/go7007/go7007-i2c.c
  drivers/staging/go7007/go7007-usb.c
  drivers/staging/go7007/snd-go7007.c
  drivers/staging/go7007/wis-ov7640.c
  drivers/staging/go7007/wis-saa7113.c
  drivers/staging/go7007/wis-saa7115.c
  drivers/staging/go7007/wis-sony-tuner.c
  drivers/staging/go7007/wis-tw2804.c
  drivers/staging/go7007/wis-tw9903.c
  drivers/staging/go7007/wis-uda1342.c

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-22 09:56:31 -07:00
Takashi Iwai 27dee52dfb go7007 - Add missing dependency on sound subsystem
The dependency on the sound system is missing for go7007 driver, which
resulted in missing symbols like
  drivers/built-in.o: In function `go7007_snd_remove':
  : undefined reference to `snd_card_disconnect'
  drivers/built-in.o: In function `go7007_snd_remove':
  : undefined reference to `snd_card_free_when_closed'
  ...

This patch adds the dependency on CONFIG_SND, and selects CONFIG_SND_PCM
properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Ingo Molnar <mingo@elte.hu>
Cc: Ross Cohen <rcohen@snurgle.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-20 14:52:16 +02:00
Ross Cohen df20d69ec9 Staging: go7007 v4l fixes
Fix up some of the v4l issues that were recently changed to make the
go7007 driver a bit cleaner.


From: Ross Cohen <rcohen@snurgle.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-10 15:31:11 -07:00
Greg Kroah-Hartman 866b8695d6 Staging: add the go7007 video driver
Todo:
	- checkpatch.pl cleanups
	- sparse cleanups
	- lots of little modules, should be merged together
	  and added to the build.
	- testing?
	- handle churn in v4l layer.

Many thanks to Ross Cohen <rcohen@snurgle.org> for cleanup patches on
this driver.

Cc: Ross Cohen <rcohen@snurgle.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-10 15:31:08 -07:00