aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/go7007/go7007-driver.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
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>
2010-03-03staging: declare MODULE_FIRMWARE in various driversBen Hutchings1-0/+2
Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-05V4L/DVB (13458): go7007: subdev conversionPete Eberlein1-8/+10
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 (13456): s2250: Change module structurePete Eberlein1-1/+1
The s2250-board i2c module was converted to use v4l2-i2c-drv.h in preparation for its subdev conversion. This change prevented the s2250-loader from being initialized within the same module due to the module_init and module_exit function definitions in v4l2-i2c-drv.h. Therefore, s2250-loader is now its own module, and the header for exporting s2250-loader functions is no longer needed. The s2250 i2c module name was "2220-board" in some places, and was changed to "s2250". 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-5/+5
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 (13027): go7007: convert printks to v4l2_infoPete Eberlein1-12/+11
Use v4l2_info and v4l2_err where appropriate. 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-6/+6
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-04-21go7007: Convert to the new i2c device binding modelJean Delvare1-2/+9
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-17Staging: go7007: fix build issuesGreg Kroah-Hartman1-15/+0
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-01-06Staging: go7007: add sensoray 2250/2251 supportPete Eberlein1-0/+3
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-06Staging: go7007: saa7134 updatesPete Eberlein1-1/+1
- 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>
2008-10-22Staging: go7007: remove unused #include <version.h>Huang Weiyi1-1/+0
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-10Staging: go7007 v4l fixesRoss Cohen1-1/+1
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/+688
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>