summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* V4L/DVB: gspca - sonixj: Propagate USB errors to higher levelJean-François Moine2010-10-211-18/+67
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - spca505: Remove the eeprom write commands of NxUltraJean-François Moine2010-10-211-4/+0
| | | | | | | | With a null request byte, these commands prevented the next commands to be executed. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - cpia1: Fix compilation warning when gspca debug disabledJean-François Moine2010-10-211-0/+2
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - benq: Remove useless module load/unload messagesJean-François Moine2010-10-211-8/+1
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: gspca - benq: Display error messages when gspca debug disabledJean-François Moine2010-10-211-6/+5
| | | | | Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: soc-camera: allow only one video queue per deviceGuennadi Liakhovetski2010-10-215-105/+103
| | | | | | | | | Multiple user-space application instances can open the same video device, but it only makes sense for one of them to manage the videobuffer queue and set video format of the device. Restrict soc-camera respectively. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: V4L2: add a generic function to find the nearest discrete format to ↵Guennadi Liakhovetski2010-10-211-0/+24
| | | | | | | | | | | | | the required one Many video drivers implement a fixed set of frame formats and thus face a task of finding the best match for a user-requested format. Implementing this in a generic function has also an advantage, that different drivers with similar supported format sets will select the same format for the user, which improves consistency across drivers. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: mx2_camera: add informative camera clock frequency printoutMichael Grzeschik2010-10-211-0/+3
| | | | | | Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: mx2_camera: implement forced termination of active buffer for mx25Baruch Siach2010-10-211-4/+16
| | | | | | | | | This allows userspace to terminate a capture without waiting for the current frame to complete. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: mx2_camera: fix comment typoBaruch Siach2010-10-211-1/+1
| | | | | | Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: mx2_camera: remove emma limitation for RGB565Michael Grzeschik2010-10-211-10/+5
| | | | | | | | | In the current source status the emma has no limitation for any PIXFMT since the data is parsed raw and unprocessed into the memory. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: mt9m111: register cleanup hex to dec bitoffsetMichael Grzeschik2010-10-211-8/+8
| | | | | | | Signed-off-by: Philipp Wiesner <p.wiesner@phytec.de> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: cpia2: remove V4L1 support from this driverHans Verkuil2010-10-215-346/+51
| | | | | | | V4L1 is deprecated and will be removed completely soon. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: em28xx: fix a compilation warningMauro Carvalho Chehab2010-10-211-1/+0
| | | | | | | drivers/media/video/em28xx/em28xx-video.c: In function ‘vidioc_s_register’: drivers/media/video/em28xx/em28xx-video.c:1617: warning: unused variable ‘rc’ Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: radio-mr800: remove BKLHans Verkuil2010-10-211-64/+10
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: em28xx: the default std was not passed on to the subdevsHans Verkuil2010-10-211-0/+1
| | | | | | | | | | | | The initial em28xx std (PAL) was not passed on to the subdevs. This led to these tvp5150 kernel log errors when running v4l2-ctl --all: tvp5150 0-005c: VBI can't be configured without knowing number of lines The reason was that tvp5150 was still using its own internal default: STD_ALL. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: em28xx: remove BKLHans Verkuil2010-10-211-82/+10
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: vivi: remove BKLHans Verkuil2010-10-211-10/+7
| | | | | Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: videobuf: add queue argument to videobuf_waiton()Hans Verkuil2010-10-2119-35/+56
| | | | | | | | | | | | | | | | videobuf_waiton() must unlock and relock ext_lock if it has to wait. For that to happen it needs the videobuf_queue pointer. Don't attempt to unlock/relock q->ext_lock unless it was locked in the first place. vb->state has to be protected by a spinlock to be safe. This patch is based on code from Mauro Carvalho Chehab <mchehab@redhat.com>. [mchehab@redhat.com: add extra argument to a few missing places] Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: videobuf: add ext_lock argument to the queue init functionsHans Verkuil2010-10-2124-33/+40
| | | | | | | | | Add an ext_lock argument to the videobuf init functions. This allows drivers to pass the vdev->lock pointer (or any other externally held lock) to videobuf. For now all drivers just pass NULL. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: videobuf: prepare to make locking optional in videobufHans Verkuil2010-10-215-42/+42
| | | | | | | | | | | | | Currently videobuf uses the vb_lock mutex to lock its data structures. But this locking will (optionally) move into the v4l2 core, which means that in that case vb_lock shouldn't be used since the external lock is already held. Prepare for this by adding a pointer to such an external mutex and don't lock if that pointer is set. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l2: add core serialization lockHans Verkuil2010-10-212-19/+66
| | | | | | | | | | | | | | | | | | Drivers can optionally set a pointer to a mutex in struct video_device. The core will use that to lock before calling open, read, write, unlocked_ioctl, poll, mmap or release. Updated the documentation as well and ensure that v4l2-event knows about the lock: it will unlock it before doing a blocking wait on an event and relock it afterwards. Ensure that the 'video_is_registered' check is done when the lock is held: a typical disconnect will take the lock as well before unregistering the device nodes, so to prevent race conditions the video_is_registered check should also be done with the lock held. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l2-dev: remove get_unmapped_areaHans Verkuil2010-10-211-18/+0
| | | | | | | The get_unmapped_area file operation is unused. Remove. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l2-dev: after a disconnect any ioctl call will be blockedHans Verkuil2010-10-211-2/+2
| | | | | | | | | | Until now all fops except release and (unlocked_)ioctl returned an error after the device node was unregistered. Extend this as well to the ioctl fops. There is nothing useful that an application can do here and it complicates the driver code unnecessarily. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: Deprecate stradis driverMauro Carvalho Chehab2010-10-218-9/+19
| | | | | | | | | | | | | | | The driver author seems to not worked on this driver since its conversion from 2.2 to 2.4. Nobody is known to have a stradis hardware for testing. As it still uses V4L1 API, BKL and probably some other old stuff, someone would need to work on it to preserve the driver. Instead of investing time and efforts to keep porting it to work with new API's, it seems better to just drop the driver. So, let's move it to drivers/staging and label it to die at 2.6.38, if nobody cares enough to port parallel port support to gspca or to create a new driver that uses the same gspca-cpia sub-driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: Deprecate cpia driver (used for parallel port webcams)Mauro Carvalho Chehab2010-10-2111-43/+55
| | | | | | | | | | | | | | | | | cpia driver were re-written inside gspca driver, for USB devices. The only functionality that were not migrated is the support for parallel port, as: 1) the developer didn't find any hardware; 2) it doesn't seem important to keep support for a parallel port webcam, as this is an obsolete technology; 3) the changes at gspca for it to work with parallel port would be very large; 4) this driver still uses BKL. So, let's move it to drivers/staging and label it to die at 2.6.38, if nobody cares enough to port parallel port support to gspca or to create a new driver that uses the same gspca-cpia sub-driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: cx88: Remove BKLMauro Carvalho Chehab2010-10-212-15/+16
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: bttv: use unlocked ioctlMauro Carvalho Chehab2010-10-211-7/+7
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: bttv: fix driver lock and remove explicit calls to BKLMauro Carvalho Chehab2010-10-211-58/+143
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: bttv: Fix mutex unbalance at bttv_pollMauro Carvalho Chehab2010-10-211-3/+1
| | | | | | Don't do double mutex_unlock when reading a stream at bttv_poll. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: bttv-driver: document functions using mutex_lockMauro Carvalho Chehab2010-10-211-25/+25
| | | | | | | | | There are a few ancillary static routines used by ioctl functions that takes bttv lock internally. As we'll be adding the same lock for all ioctl's that need, we need to properly document them, to avoid doing double locks Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: radio-si470x: use unlocked ioctlMauro Carvalho Chehab2010-10-212-6/+22
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: radio-si470x: remove the BKL lock used internally at the driverMauro Carvalho Chehab2010-10-212-10/+8
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: v4l: fsl-viu.c: add slab.h include to fix compile breakageAnatolij Gustschin2010-10-211-0/+1
| | | | | | | | | | | | | | | | | | | mpc512x kernel configurations without SPI support do not build: drivers/media/video/fsl-viu.c: In function 'viu_open': drivers/media/video/fsl-viu.c:1248: error: implicit declaration of function 'kzalloc' drivers/media/video/fsl-viu.c:1248: warning: assignment makes pointer from integer without a cast drivers/media/video/fsl-viu.c: In function 'viu_release': drivers/media/video/fsl-viu.c:1335: error: implicit declaration of function 'kfree' If CONFIG_SPI is enabled, the slab.h will be included in linux/spi/spi.h which is included by media/v4l2-common.h and the fsl_viu.c driver builds. Let's incluce linux/slab.h directly to fix the build breakage. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: dvb/bt8xx: kill the big kernel lockArnd Bergmann2010-10-211-3/+4
| | | | | | | | | The bt8xx driver only uses the big kernel lock in its dst_ca_ioctl function and never to serialize against other code, so we can trivially replace it with a private mutex. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: dvb-core: kill the big kernel lockArnd Bergmann2010-10-214-40/+11
| | | | | | | | | | | The dvb core only uses the big kernel lock in the open and ioctl functions, which means it can be replaced with a dvb specific mutex. Fortunately, all the ioctl functions go through dvb_usercopy, so we can move the serialization in there. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: drivers/media/video/zoran: Don't use initialized char arrayJoe Perches2010-10-211-8/+4
| | | | | | | Just fill the array as necessary and terminate with 0 Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: media: cx23885: use '%pM' format to print MAC addressAndy Shevchenko2010-10-211-4/+1
| | | | | Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: cx22702: Simplify cx22702_set_tps()Jean Delvare2010-10-211-32/+26
| | | | | | | | | | Code in function cx22702_set_tps() can be slightly simplified. Apparently gcc was smart enough to optimize it anyway, but it can't hurt to make the code more readable. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: cx22702: Some things never changeJean Delvare2010-10-211-3/+3
| | | | | | | | The init sequence never changes so it can be marked const. Likewise, cx22702_ops is a template and can thus be made read-only. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: cx22702: Avoid duplicating code in branchesJean Delvare2010-10-211-15/+16
| | | | | | | | | Calling the same functions in if/else or switch/case branches is inefficient. Refactor the code for a smaller binary and increased readability. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: Fix Kconfig dependencies for VIDEO_IRMauro Carvalho Chehab2010-10-212-2/+2
| | | | | | | warning: (VIDEO_GO7007 && STAGING && !STAGING_EXCLUDE_BUILD && VIDEO_DEV && PCI && I2C && INPUT && BKL && SND || VIDEO_CX25821 && STAGING && !STAGING_EXCLUDE_BUILD && DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT && BKL) selects VIDEO_IR which has unmet direct dependencies (IR_CORE) warning: (VIDEO_CX25821 && STAGING && !STAGING_EXCLUDE_BUILD && DVB_CORE && VIDEO_DEV && PCI && I2C && INPUT && BKL) selects VIDEO_IR which has unmet direct dependencies (IR_CORE) Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: saa7134: split RC code into a different moduleMauro Carvalho Chehab2010-10-214-11/+30
| | | | | | | This allows the removal of CONFIG_INPUT from saa7134, and helps to create a better Kconfig dependency hierarchy. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4l/DVB: saa7134: properly mark some functions as staticMauro Carvalho Chehab2010-10-211-2/+2
| | | | Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: tvaudio: remove obsolete tda8425 initializationHans Verkuil2010-10-211-13/+0
| | | | | | | | | | | | The tda8425 initialization function sets up the inputmap for riva boards. After some digging I discovered that this was for the V4L rivatv driver that is found on sourceforge. This driver hasn't been maintained since the last 5 years and will no longer work with the current v4l framework. So we can safely remove this. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: cx22702: Drop useless initializations to 0Jean Delvare2010-10-211-3/+2
| | | | | | | | These variables are either unconditionally set right afterward, or already set to 0 by kzalloc. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: cx22702: Clean up register access functionsJean Delvare2010-10-211-10/+13
| | | | | | | | | * Avoid temporary variables. * Optimize success paths. * Make error messages consistently verbose. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: dvb: Convert "mutex" to semaphoreThomas Gleixner2010-10-211-2/+2
| | | | | | | Get rid of init_MUTEX[_LOCKED]() and use sema_init() instead. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: IR/lirc_dev: check for valid irctl in unregister pathJarod Wilson2010-10-211-0/+5
| | | | | | | Prompted by Red Hat bugzilla #633023 Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* V4L/DVB: IR/imon: set up mce-only devices w/mce keytableJarod Wilson2010-10-211-126/+138
| | | | | | | | | | | | Currently, they get set up with the pad keytable, which they can't actually use at all. Also add another variant of volume scancodes from another 0xffdc device, and properly set up the 0x9e 0xffdc device as an iMON VFD w/MCE proto IR. Based on data and a prior patch from Anders Eriksson on the lirc list. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>