aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/go7007/go7007-v4l2.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-11-03staging: Move media drivers to staging/mediaMauro Carvalho Chehab1-1839/+0
In practice, it is being hard to distinguish when a patch should go to staging tree or to the media tree. Better to distinguish it, by putting the media drivers at a separate staging directory. Newer staging drivers that include anything with "dvb*.h", "v4l2*.h" or "videodev2.h" should go to the drivers/staging/media tree. Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21V4L/DVB: go7007: convert to use the mediabus APIHans Verkuil1-10/+9
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-14Staging: Use kcalloc or kzallocJulia Lawall1-3/+1
Use kcalloc or kzalloc rather than the combination of kmalloc and memset. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression x,y,flags; statement S; type T; @@ x = - kmalloc + kcalloc ( - y * sizeof(T), + y, sizeof(T), flags); if (x == NULL) S -memset(x, 0, y * sizeof(T)); @@ expression x,size,flags; statement S; @@ -x = kmalloc(size,flags); +x = kzalloc(size,flags); if (x == NULL) S -memset(x, 0, size); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.hTejun Heo1-0/+1
percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2009-12-16V4L/DVB (13556): v4l: Remove unneeded video_device::minor assignmentsLaurent Pinchart1-1/+0
Now that the video_device registration is tested using video_is_registered(), drivers don't need to initialize the video_device::minor field to -1 anymore. Remove those unneeded assignments. [mchehab.redhat.com: removed tm6000 changes as tm6000 is not ready yet for submission even on staging] Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-16V4L/DVB (13550): v4l: Use the new video_device_node_name functionLaurent Pinchart1-2/+2
Fix all device drivers to use the new video_device_node_name function. This also strips kernel log messages from the "/dev/" prefix, has the device node location is a userspace policy decision unknown to the kernel. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13458): go7007: subdev conversionPete Eberlein1-63/+37
Convert the go7007 driver to v4l2 subdev interface, using v4l2 i2c subdev functions instead of i2c functions directly. The v4l2 ioctl ops functions call subdev ops instead of i2c commands. Signed-off-by: Pete Eberlein <pete@sensoray.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05V4L/DVB (13455): go7007: Add struct v4l2_device.Pete Eberlein1-1/+8
This adds a struct v4l2_device to the go7007 device struct and registers it during v4l2 initialization. The v4l2_device registration overwrites the go->dev device_data, which is a struct usb_interface with intfdata set to the struct go7007. This changes intfdata to point to the struct v4l2_device inside struct go7007, which is what v4l2_device_register will also set it to (and warn about non-null drvdata on register.) Since usb disconnect can happen any time, this intfdata should always be present. Signed-off-by: Pete Eberlein <pete@sensoray.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19V4L/DVB (13024): go7007: Implement vidioc_g_std and vidioc_querystdPete Eberlein1-17/+35
Implemented the vidio_g_std and vidio_querystd ioctls. Signed-off-by: Pete Eberlein <pete@sensoray.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19V4L/DVB (13023): go7007: Merge struct gofh and go declarationsPete Eberlein1-42/+21
The declarations for struct go7007_file *gofh and struct go7007 *go can be merged when gofh isn't used by the function. Signed-off-by: Pete Eberlein <pete@sensoray.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19V4L/DVB (13022): go7007: Fix mpeg controlsPete Eberlein1-28/+16
MPEG controls were disabled by Mauro's ioctl conversion patch. They are now re-enabled and cleaned up. Signed-off-by: Pete Eberlein <pete@sensoray.com> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-19V4L/DVB (12859): go7007: semaphore -> mutex conversionMauro Carvalho Chehab1-33/+33
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-03Staging: go7007: fix build errorGreg Kroah-Hartman1-1/+0
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-01-07V4L/DVB (10176a): Switch remaining clear_user_page users over to clear_user_highpageGuennadi Liakhovetski1-2/+1
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-06Staging: go7007: add some more v4l2 ioctlsGreg Kroah-Hartman1-4/+0
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-06Staging: go7007: fix minor build warningsGreg Kroah-Hartman1-1/+4
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-06Staging: go7007: Convert driver to use video_ioctl2Mauro Carvalho Chehab1-692/+820
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-06Staging: go7007: saa7134 updatesPete Eberlein1-13/+268
- 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-06Staging: go7007: fixes due v4l2_file_operations api changeGreg Kroah-Hartman1-6/+4
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-06Staging: go7007: fixes due to video_usercopy api changeGreg Kroah-Hartman1-3/+2
video_usercopy() just changed its arguments, so fix up the go7007 driver to properly build. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-10Staging: go7007 v4l fixesRoss Cohen1-8/+4
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-10Staging: add the go7007 video driverGreg Kroah-Hartman1-0/+1503
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>