]> git.proxmox.com Git - mirror_ubuntu-kernels.git/log
mirror_ubuntu-kernels.git
14 years agoV4L/DVB: gspca - main: Fix a compilation warning
Jean-François Moine [Wed, 14 Jul 2010 09:21:16 +0000 (06:21 -0300)]
V4L/DVB: gspca - main: Fix a compilation warning

Reported-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: au0828: move dereference below sanity checks
Dan Carpenter [Fri, 23 Jul 2010 10:09:20 +0000 (07:09 -0300)]
V4L/DVB: au0828: move dereference below sanity checks

This function has sanity checks to make sure that "dev" is non-null.  I
moved the dereference down below the checks.  In the current code "dev"
is never actually null.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: media/IR: testing the wrong variable
Dan Carpenter [Fri, 23 Jul 2010 10:08:26 +0000 (07:08 -0300)]
V4L/DVB: media/IR: testing the wrong variable

There is a typo here.  We meant to test "rbuf" instead of "drv".  We
already tested "drv" earlier.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/video/omap2/displays: add missing mutex_unlock
Julia Lawall [Tue, 20 Jul 2010 22:22:44 +0000 (19:22 -0300)]
V4L/DVB: drivers/video/omap2/displays: add missing mutex_unlock

Add a mutex_unlock missing on the error paths.  The use of the mutex is
balanced elsewhere in the file.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression E1;
@@

* mutex_lock(E1,...);
  <+... when != E1
  if (...) {
    ... when != E1
*   return ...;
  }
  ...+>
* mutex_unlock(E1,...);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: "dib3000mc: reduce large stack usage" fix
Andrew Morton [Tue, 20 Jul 2010 22:22:42 +0000 (19:22 -0300)]
V4L/DVB: "dib3000mc: reduce large stack usage" fix

s/ENODEV/ENOMEM, per Andreas.

This fix got lost when someone merged "dib3000mc: reduce large stack
usage".  Please don't lose fixes.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: VIDEO: ivtvfb, remove unneeded NULL test
Jiri Slaby [Mon, 19 Jul 2010 17:39:34 +0000 (14:39 -0300)]
V4L/DVB: VIDEO: ivtvfb, remove unneeded NULL test

Stanse found that in ivtvfb_callback_cleanup and ivtvfb_callback_init
there are unneeded tests for itv being NULL. But itv is initialized
as container_of with non-zero offset in those functions, so it is
never NULL (even if v4l2_dev is). This was found because itv is
dereferenced earlier than the test.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reviewed-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/lirc: use memdup_user instead of copy_from_user
Jarod Wilson [Fri, 16 Jul 2010 21:29:54 +0000 (18:29 -0300)]
V4L/DVB: IR/lirc: use memdup_user instead of copy_from_user

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/lirc: make lirc userspace and staging modules buildable
Jarod Wilson [Fri, 16 Jul 2010 17:25:33 +0000 (14:25 -0300)]
V4L/DVB: IR/lirc: make lirc userspace and staging modules buildable

The lirc userspace needs all the current ioctls defined, and we need to
put the header files in places out-of-tree and/or staging lirc drivers
(which I plan to prep soon) can easily build with. I've actually tested this
in a tree w/all the lirc drivers queued up to be submitted for staging. I'm
also reasonably sure that Andy Walls is going to need most of the ioctls
anyway for his cx23888 IR driver work.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/video: Remove dead CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE
Christian Dietrich [Wed, 14 Jul 2010 13:21:30 +0000 (10:21 -0300)]
V4L/DVB: drivers/media/video: Remove dead CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE

CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE doesn't exist in Kconfig and is never defined anywhere
else, therefore removing all references for it from the source code.

Signed-off-by: Christian Dietrich <qy03fugy@stud.informatik.uni-erlangen.de>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media: Remove unnecessary casts of private_data
Joe Perches [Mon, 12 Jul 2010 20:50:03 +0000 (17:50 -0300)]
V4L/DVB: drivers/media: Remove unnecessary casts of private_data

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - sq930x: Add some comments for sensor mt9v111
Jean-François Moine [Tue, 6 Jul 2010 08:14:57 +0000 (05:14 -0300)]
V4L/DVB: gspca - sq930x: Add some comments for sensor mt9v111

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - vc032x: Add trace of USB exchanges
Jean-François Moine [Tue, 6 Jul 2010 08:05:05 +0000 (05:05 -0300)]
V4L/DVB: gspca - vc032x: Add trace of USB exchanges

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - vc032x: Stop the USB exchanges on error
Jean-François Moine [Tue, 6 Jul 2010 08:00:07 +0000 (05:00 -0300)]
V4L/DVB: gspca - vc032x: Stop the USB exchanges on error

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - vc032x: Add some comments
Jean-François Moine [Tue, 6 Jul 2010 07:44:54 +0000 (04:44 -0300)]
V4L/DVB: gspca - vc032x: Add some comments

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - main: Don't use the frame buffer flags
Jean-François Moine [Tue, 6 Jul 2010 07:32:27 +0000 (04:32 -0300)]
V4L/DVB: gspca - main: Don't use the frame buffer flags

This patch fixes possible race conditions in queue management with SMP:
when a frame was completed, the irq function tried to use the next frame
buffer. At this time, it was possible that the application on an other
processor updated the frame pointer, making the image to point to a bad
buffer.
The patch contains two main changes:
- the image transfer uses the queue indexes which are protected against
  simultaneous memory access,
- the image pointer which is used for image concatenation is only set at
  interrupt level.
Some subdrivers which used the image pointer have been updated.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - main: Possible race condition in queue management
Jean-François Moine [Tue, 6 Jul 2010 07:16:40 +0000 (04:16 -0300)]
V4L/DVB: gspca - main: Possible race condition in queue management

The problem may occur with SMP:
- a frame is completed at interrupt level (in gspca_frame_add with
  packet_type == LAST_PACKET,
- just after clearing the bit V4L2_BUF_FLAG_QUEUED and before setting
  the bit V4L2_BUF_FLAG_DONE, on the other processor, the application
  tries to requeue the same frame buffer,
- then, the qbuf function succeeds because ALL_FLAGS are not set.
The fix sets and resets the two flags in one instruction.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: remove obsolete conditionalizing on DVB_DIBCOM_DEBUG
Christoph Egger [Fri, 15 Jan 2010 11:49:41 +0000 (08:49 -0300)]
V4L/DVB: remove obsolete conditionalizing on DVB_DIBCOM_DEBUG

As pointed by Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>,

The config Option DVB_DIBCOM_DEBUG was dropped while removing the dibusb
driver in favor of dvb-usb in 2005. However it remaind existant at some
places of the kernel config.

Instead of just removing the debug capability, the better is to just remove
the bad dependency, making the modprobe function always visible.

Thanks-to: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: lgs8gxx: remove firmware for lgs8g75
Ben Hutchings [Sun, 1 Nov 2009 02:14:35 +0000 (23:14 -0300)]
V4L/DVB: lgs8gxx: remove firmware for lgs8g75

The recently added support for lgs8g75 included some 8051 machine code
without accompanying source code.  Replace this with use of the
firmware loader.

Compile-tested only.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: si470x: -EINVAL overwritten in si470x_vidioc_s_tuner()
Tobias Lorenz [Sat, 10 Jul 2010 16:01:33 +0000 (13:01 -0300)]
V4L/DVB:  si470x: -EINVAL overwritten in si470x_vidioc_s_tuner()

This patch to the si470x_vidioc_s_tuner function was developed in
cooperation with Roel Kluin <roel.kluin@gmail.com>. It sets the default
retval to 0 instead of -EINVAL, identical to what is done in all other
set/get functions of v4l2_ioctl_ops. This is just as cosmetic change, as
retval is directly overwritten by the si470x_disconnect_check() anyway.

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/mceusb: more streamlining of device init
Jarod Wilson [Thu, 8 Jul 2010 15:38:57 +0000 (12:38 -0300)]
V4L/DVB: IR/mceusb: more streamlining of device init

Spent a while last night getting device initialization packet captures
under Windows for all generations of devices. There are a few places
where we were doing things differently, and few things we were doing
that we don't need to do, particularly on gen3 hardware, and I *think*
one of those things is what was locking up my pinnacle hw from time to
time -- at least, its been perfectly well behaved every time its been
plugged in since making this change.

First up, we're adding a bit more to the gen1 init routine here. Its
not absolutely necessary, the hardware works the same both with and
without it, but I'd like to be consistent w/Windows here.

Second, DEVICE_RESET is never called when initializing either of my
gen3 devices, its only called for gen1 and gen2. The bits in the gen3
init after removing that, are safe (and interesting) to run on all
hardware, so there's no more gen3-specific init done, there's instead
a generic mceusb_get_parameters() that is run for all hardware.

Third, the gen3 flag isn't needed. We only care if hardware is gen3
during probe, so I've dropped that from the device flags struct.

Successfully tested on all three generations of mceusb hardware.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/mceusb: remove unused vars from gen1 init
Mauro Carvalho Chehab [Sat, 10 Jul 2010 14:19:42 +0000 (11:19 -0300)]
V4L/DVB: IR/mceusb: remove unused vars from gen1 init

Prior init unification/simplification patch made these unused, forgot
to remove them, so this silences:

drivers/media/IR/mceusb.c: In function ‘mceusb_gen1_init’:
drivers/media/IR/mceusb.c:769: warning: unused variable ‘partial’
drivers/media/IR/mceusb.c:768: warning: unused variable ‘i’

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: lirc: use unlocked_ioctl
Arnd Bergmann [Mon, 2 Aug 2010 18:43:35 +0000 (15:43 -0300)]
V4L/DVB: lirc: use unlocked_ioctl

New code should not rely on the big kernel lock,
so use the unlocked_ioctl file operation in lirc.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Jarod Wilson <jarod@redhat.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR: jvc-decoder needs BITREVERSE
Randy Dunlap [Wed, 7 Jul 2010 23:41:15 +0000 (20:41 -0300)]
V4L/DVB: IR: jvc-decoder needs BITREVERSE

ir-jvc-decoder uses bitreverse interfaces, so it should select
BITREVERSE.

ir-jvc-decoder.c:(.text+0x550bc): undefined reference to `byte_rev_table'
ir-jvc-decoder.c:(.text+0x550c6): undefined reference to `byte_rev_table'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/lirc_dev: fix locking in lirc_dev_fop_read
Jarod Wilson [Wed, 7 Jul 2010 14:29:44 +0000 (11:29 -0300)]
V4L/DVB: IR/lirc_dev: fix locking in lirc_dev_fop_read

On Wed, Jul 07, 2010 at 02:52:58PM +0200, Jiri Slaby wrote:
> Hi,
>
> stanse found a locking error in lirc_dev_fop_read:
> if (mutex_lock_interruptible(&ir->irctl_lock))
>   return -ERESTARTSYS;
> ...
> while (written < length && ret == 0) {
>   if (mutex_lock_interruptible(&ir->irctl_lock)) {    #1
>     ret = -ERESTARTSYS;
>     break;
>   }
>   ...
> }
>
> remove_wait_queue(&ir->buf->wait_poll, &wait);
> set_current_state(TASK_RUNNING);
> mutex_unlock(&ir->irctl_lock);                        #2
>
> If lock at #1 fails, it beaks out of the loop, with the lock unlocked,
> but there is another "unlock" at #2.

This should do the trick. Completely untested beyond compiling, but its
not exactly a complicated fix, and in practice, I'm not aware of anyone
ever actually tripping that locking bug, so there's zero functional change
in typical use here.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Retrieve firmware for az6027
Renzo Dani [Tue, 6 Jul 2010 10:23:33 +0000 (07:23 -0300)]
V4L/DVB: Retrieve firmware for az6027

Signed-off-by: Renzo Dani <arons7@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l2-dev: fix memory leak
Anatolij Gustschin [Thu, 1 Jul 2010 17:21:39 +0000 (14:21 -0300)]
V4L/DVB: v4l2-dev: fix memory leak

Since commit b4028437876866aba4747a655ede00f892089e14
the 'driver_data' field resides in device's struct device_private
which may be allocated by dev_set_drvdata() if device_private
struct was not allocated previously.

dev_set_drvdata() is used in video_set_drvdata() to set
the driver's private data pointer in v4l2 drivers. Setting
the private data _before_ registering the v4l2 device results
in a memory leak since __video_register_device() also calls
video_set_drvdata(), but after zeroing the device structure.
Thus, the reference to the previously allocated device_private
struct goes lost and a new device_private will be allocated.

All v4l drivers which call video_set_drvdata() _before_
calling video_register_device() are affected. The patch fixes
__video_register_device() to preserve previously allocated
device_private reference.

Caught by kmemleak.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: dvb_frontend: fix typos in comments and one function
Guillaume Audirac [Thu, 6 May 2010 12:30:25 +0000 (09:30 -0300)]
V4L/DVB: dvb_frontend: fix typos in comments and one function

Signed-off-by: Guillaume Audirac <guillaume.audirac@webag.fr>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tda10048: clear the uncorrected packet registers when saturated
Guillaume Audirac [Thu, 6 May 2010 12:07:04 +0000 (09:07 -0300)]
V4L/DVB: tda10048: clear the uncorrected packet registers when saturated

Use the register CLUNC to reset the CPTU registers (LSB & MSB) when they
saturate at 0xFFFF. Fixes as well a few register typos.

Signed-off-by: Guillaume Audirac <guillaume.audirac@webag.fr>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tda10048: fix bitmask for the transmission mode
Guillaume Audirac [Thu, 6 May 2010 12:04:56 +0000 (09:04 -0300)]
V4L/DVB: tda10048: fix bitmask for the transmission mode

Add a missing bit for reading the transmission mode (2K/8K) in
tda10048_get_tps

Signed-off-by: Guillaume Audirac <guillaume.audirac@webag.fr>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tda10048: fix the uncomplete function tda10048_read_ber
Guillaume Audirac [Wed, 5 May 2010 11:34:57 +0000 (08:34 -0300)]
V4L/DVB: tda10048: fix the uncomplete function tda10048_read_ber

Completes the bit-error-rate read function with the CBER register (before
Viterbi decoder). The returned value is 1e8*actual_ber to be positive.
Also includes some typo mistakes.

Signed-off-by: Guillaume Audirac <guillaume.audirac@webag.fr>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx23885: Enable Message Signaled Interrupts(MSI)
Kusanagi Kouichi [Sat, 6 Feb 2010 05:45:33 +0000 (02:45 -0300)]
V4L/DVB: cx23885: Enable Message Signaled Interrupts(MSI)

Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/mceusb: unify and simplify different gen device init
Jarod Wilson [Sun, 4 Jul 2010 01:42:14 +0000 (22:42 -0300)]
V4L/DVB: IR/mceusb: unify and simplify different gen device init

Started out as an effort to try to tackle the last remaining issue I'm
having with this damned pinnacle device getting wedged the first time
its plugged in after an indeterminate length of not being plugged in.
Didn't get that solved yet, but did streamline the init code a bit more
and remove some superfluous gunk. Nukes a completely unneeded call to
usb_device_init() and several lines of overly complex crap in the gen1
device init path.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: v4l: Add MPC5121e VIU video capture driver
Anatolij Gustschin [Fri, 2 Jul 2010 13:10:09 +0000 (10:10 -0300)]
V4L/DVB: v4l: Add MPC5121e VIU video capture driver

Adds support for Video-In (VIU) unit of Freescale
MPC5121e. The driver supports RGB888/RGB565 formats,
capture and overlay on MPC5121e DIU frame buffer.

Signed-off-by: Hongjun Chen <hong-jun.chen@freescale.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Add support for Manta MM-353 Plako
Laurent Pinchart [Fri, 25 Jun 2010 07:58:43 +0000 (04:58 -0300)]
V4L/DVB: uvcvideo: Add support for Manta MM-353 Plako

The camera requires the PROBE_MINMAX quirk. Add a corresponding entry
in the device IDs list

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Don't use stack-based buffers for USB transfers
Laurent Pinchart [Fri, 18 Jun 2010 14:31:24 +0000 (11:31 -0300)]
V4L/DVB: uvcvideo: Don't use stack-based buffers for USB transfers

Data buffers on the stack are not allowed for USB I/O. Use dynamically
allocated buffers instead when querying control length and control
capabilities.

The control capabilities are now also stored in the uvc_control
structure.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Define control information bits using macros
Laurent Pinchart [Thu, 17 Jun 2010 14:11:51 +0000 (11:11 -0300)]
V4L/DVB: uvcvideo: Define control information bits using macros

Use the macros instead of hardcoding numerical constants for the
controls information bitfield.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Support menu controls in the control mapping API
Laurent Pinchart [Thu, 18 Feb 2010 19:38:52 +0000 (16:38 -0300)]
V4L/DVB: uvcvideo: Support menu controls in the control mapping API

The UVCIOC_CTRL_MAP ioctl doesn't support menu entries for menu
controls. As the uvc_xu_control_mapping structure has no reserved
fields, this can't be fixed while keeping ABI compatibility.

Modify the UVCIOC_CTRL_MAP ioctl to add menu entries support, and define
UVCIOC_CTRL_MAP_OLD that supports the old ABI without any ability to add
menu controls.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Make button controls work properly
Hans de Goede [Wed, 19 May 2010 23:15:00 +0000 (20:15 -0300)]
V4L/DVB: uvcvideo: Make button controls work properly

According to the v4l2 spec, writing any value to a button control should
result in the action belonging to the button control being triggered.
UVC cams however want to see a 1 written, this patch fixes this by
overriding whatever value user space passed in with -1 (0xffffffff) when
the control is a button control.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: uvcvideo: Add support for absolute pan/tilt controls
Martin Rubli [Wed, 19 May 2010 22:51:56 +0000 (19:51 -0300)]
V4L/DVB: uvcvideo: Add support for absolute pan/tilt controls

Signed-off-by: Martin Rubli <martin_rubli@logitech.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/imon: auto-configure another 0xffdc device variant
Jarod Wilson [Sun, 4 Jul 2010 01:48:04 +0000 (22:48 -0300)]
V4L/DVB: IR/imon: auto-configure another 0xffdc device variant

Per Pieter Hoekstra:

I have a Antec Fusion with a iMON Lcd and I get the following error:
imon 6-1:1.0: Unknown 0xffdc device, defaulting to VFD and iMON IR (id
0x9e)

The driver is functional if I load it like this: (I do not use a remote for it)
modprobe imon display_type=1 (On Mythbuntu 10.04/2.6.32)

This device is a lcd-type with support for a MCE remote. Looking at
the source code, this device (0x9e) is the same as id 0x9f.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx88: Let the user disable IR support
Jean Delvare [Mon, 28 Jun 2010 15:59:49 +0000 (12:59 -0300)]
V4L/DVB: cx88: Let the user disable IR support

It might be useful to be able to disable the IR support, either for
debugging purposes, or just for users who know they won't use the IR
remote control anyway. On many cards, IR support requires expensive
polling/sampling which is better avoided if never needed.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx88: Move I2C IR initialization
Jean Delvare [Mon, 28 Jun 2010 15:55:43 +0000 (12:55 -0300)]
V4L/DVB: cx88: Move I2C IR initialization

Move I2C IR initialization from just after I2C bus setup to right
before non-I2C IR initialization. This is the same as was done for
the bttv driver several months ago. Might solve bugs which have not yet
been reported for some cards. It makes both drivers consistent, and
makes it easier to disable IR support (coming soon.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx23885: add support for new model revisions of the HVR12xx board family
Michael Krufky [Wed, 30 Jun 2010 21:17:35 +0000 (18:17 -0300)]
V4L/DVB: cx23885: add support for new model revisions of the HVR12xx board family

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: xc5000: Fix a few warnings
Mauro Carvalho Chehab [Mon, 5 Jul 2010 21:38:46 +0000 (18:38 -0300)]
V4L/DVB: xc5000: Fix a few warnings

drivers/media/common/tuners/xc5000.c: In function ‘xc_write_reg’:
drivers/media/common/tuners/xc5000.c:298: warning: passing argument 3 of ‘xc5000_readreg’ from incompatible pointer type
drivers/media/common/tuners/xc5000.c:235: note: expected ‘u16 *’ but argument is of type ‘u8 *’
drivers/media/common/tuners/xc5000.c: At top level:
drivers/media/common/tuners/xc5000.c:223: warning: ‘xc_read_i2c_data’ defined but not used

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx23885: Convert cx23885-input to use new in kernel IR pulse decoders
Andy Walls [Mon, 28 Jun 2010 02:15:35 +0000 (23:15 -0300)]
V4L/DVB: cx23885: Convert cx23885-input to use new in kernel IR pulse decoders

Convert the cx23885 driver to use the new in kernel IR pulse
decoders for the integrated CX2388[578] IR controllers.  Rip out a lot
of RC-5 decoding related code in the process and rename some variables
for clarity or to more accurately describe their usage.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx23885: Convert from struct card_ir to struct cx23885_ir_input for IR Rx
Andy Walls [Sun, 27 Jun 2010 20:17:06 +0000 (17:17 -0300)]
V4L/DVB: cx23885: Convert from struct card_ir to struct cx23885_ir_input for IR Rx

Move from the generic, shared card_ir state structure to a cx23885 driver
specific IR state structure in anticipation of moving to the new IR pulse
decoders in the IR core.

Fix up the card name truncation in the dmesg log while we're at it,
by avoiding using fixed length string storage in our new IR state
structure.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - main: Simplify image building
Jean-François Moine [Sun, 27 Jun 2010 06:08:19 +0000 (03:08 -0300)]
V4L/DVB: gspca - main: Simplify image building

The image pointer and its length are now in the main structure instead
of in the frame buffer. They are updated on application vidioc_qbuf and
in the URB interrupt function when ending an image.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: gspca - gl860: Fix a compilation warning
Jean-François Moine [Sat, 26 Jun 2010 18:35:32 +0000 (15:35 -0300)]
V4L/DVB: gspca - gl860: Fix a compilation warning

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: vpif: removing VPIF config variables
Murali Karicheri [Sat, 12 Jun 2010 12:16:02 +0000 (09:16 -0300)]
V4L/DVB: vpif: removing VPIF config variables

The Kconfig variables are moved to video/davinci/Kconfig through another
patch and these are to be therefore removed

Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: vpfe_capture: Create separate Kconfig file for davinci devices
Vaibhav Hiremath [Sat, 12 Jun 2010 12:09:56 +0000 (09:09 -0300)]
V4L/DVB: vpfe_capture: Create separate Kconfig file for davinci devices

Currently VPFE Capture driver and DM6446 CCDC driver is being
reused for AM3517. So this patch is preparing the Kconfig/makefile
for re-use of such IP's.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Muralidharan Karicheri <mkaricheri@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tuners:tuner-simple Fix warning: variable 'tun' set but not used
Justin P. Mattock [Mon, 21 Jun 2010 16:15:47 +0000 (13:15 -0300)]
V4L/DVB: tuners:tuner-simple Fix warning: variable 'tun' set but not used

Resend due to a whitespace issue I created by mistake.
The below patch fixes a warning message create by gcc 4.6.0

 CC [M]  drivers/media/common/tuners/tuner-simple.o
drivers/media/common/tuners/tuner-simple.c: In function 'simple_set_tv_freq':
drivers/media/common/tuners/tuner-simple.c:548:20: warning: variable 'tun' set but not used

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000-input: Make checkpatch.pl happy
Mauro Carvalho Chehab [Mon, 5 Jul 2010 20:09:11 +0000 (17:09 -0300)]
V4L/DVB: tm6000-input: Make checkpatch.pl happy

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: tm6000: add ir support
Stefan Ringel [Sun, 20 Jun 2010 20:16:52 +0000 (17:16 -0300)]
V4L/DVB: tm6000: add ir support

Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/dvb/frontends: remove duplicate structure field initialization
Julia Lawall [Sun, 20 Jun 2010 13:40:37 +0000 (10:40 -0300)]
V4L/DVB: drivers/media/dvb/frontends: remove duplicate structure field  initialization

The read_status field is initialized twice to the same value.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier I, s, fld;
position p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@s@
identifier I, s, r.fld;
position r.p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@script:python@
p0 << r.p0;
fld << r.fld;
ps << s.p;
pr << r.p;
@@

if int(ps[0].line)<int(pr[0].line) or int(ps[0].column)<int(pr[0].column):
  cocci.print_main(fld,p0)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: xc5000, rework xc_write_reg
Dmitri Belimov [Tue, 18 May 2010 07:30:11 +0000 (04:30 -0300)]
V4L/DVB: xc5000, rework xc_write_reg

Rework xc_write_reg function for correct read register of the xc5000.
It is very useful for tm6000.

Tested for tm6000 and for saa7134 works well.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: dvb_ca_en50221: return -EFAULT on copy_to_user errors
Dan Carpenter [Fri, 4 Jun 2010 15:39:03 +0000 (12:39 -0300)]
V4L/DVB: dvb_ca_en50221: return -EFAULT on copy_to_user errors

copy_to_user() returns the number of bytes remaining to be copied which
isn't the right thing to return here.  The comments say that these
functions in dvb_ca_en50221.c should return the number of bytes copied or
an error return.  I've changed it to return -EFAULT.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: media/radio: fix copy_to_user to user handling
Dan Carpenter [Fri, 4 Jun 2010 10:34:40 +0000 (07:34 -0300)]
V4L/DVB: media/radio: fix copy_to_user to user handling

copy_to/from_user() returns the number of bytes remaining to be copied
but the code here was testing for negative returns.  I modified it to
return -EFAULT.  These functions are called from si4713_s_ext_ctrls() and
that only tests for negative error codes.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: mantis: Select correct frontends
Ben Hutchings [Thu, 3 Jun 2010 01:23:10 +0000 (22:23 -0300)]
V4L/DVB: mantis: Select correct frontends

Update the Kconfig selections to match the code.
Add the usual condition of !DVB_FE_CUSTOMISE.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: hdpvr: Fixes probing function
Perceval Anichini [Mon, 5 Jul 2010 18:11:51 +0000 (15:11 -0300)]
V4L/DVB: hdpvr: Fixes probing function

In the hdpvr_probe () function, when an error occurs while probing the device,
the workqueue created by the create_single_thread () call is not properly
destroyed.

Signed-off-by: Perceval Anichini <perceval@trilogic.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: s2255drv: cleanup of device structure
Dean Anderson [Tue, 1 Jun 2010 22:12:07 +0000 (19:12 -0300)]
V4L/DVB: s2255drv: cleanup of device structure

s2255drv: cleanup of device structure

cleanup of device structure.
single channel array instead of multiple arrays in device for
each channel property.
simplifies open callback by removing search for channel index.

Signed-off-by: Dean Anderson <linux-dev@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cpia_usb: remove unneeded variable
Dan Carpenter [Tue, 1 Jun 2010 08:17:27 +0000 (05:17 -0300)]
V4L/DVB: cpia_usb: remove unneeded variable

This is just a cleanup patch.  We never use the "udev" variable so I
have removed it.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: remove unneeded null check in anysee_probe()
Dan Carpenter [Mon, 31 May 2010 19:27:39 +0000 (16:27 -0300)]
V4L/DVB: remove unneeded null check in anysee_probe()

Smatch complained because "d" is dereferenced first and then checked for
null later .  The only code path where "d" could be a invalid pointer is
if this is a cold device in dvb_usb_device_init().  I consulted Antti
Palosaari and he explained that anysee is always a warm device.

I have added a comment and removed the unneeded null check.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: TechnoTrend TT-budget T-3000
Vadim Catana [Sat, 29 May 2010 15:49:16 +0000 (12:49 -0300)]
V4L/DVB: TechnoTrend TT-budget T-3000

This patch adds support for TechnoTrend TT-budget T-3000 DVB-T card.

Signed-off-by: Vadim Catana <vadim.catana@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Remove obsolete zc0301 v4l driver
Amerigo Wang [Mon, 31 May 2010 06:16:17 +0000 (03:16 -0300)]
V4L/DVB: Remove obsolete zc0301 v4l driver

On 05/29/10 01:30, Jean-Francois Moine wrote:
> On Fri, 28 May 2010 13:03:28 -0400
> Amerigo Wang<amwang@redhat.com>  wrote:
>
>> Subject: [PATCH 6/6] Remove obsolete zc0301 v4l driver
>>
>> Duplicate functionality with the gspca_zc3xx driver, zc0301 only
>> supports 2 USB-ID's (because it only supports a limited set of
>> sensors) wich are also supported by the gspca_zc3xx driver
>> (which supports 53 USB-ID's in total).
>
> You forgot to remove the conditionnal compilation in the gspca_zc3xx
> driver (USB_DEVICE(0x046d, 0x08ae) in gspca/zc3xx.c)
>

Right, thanks for pointing this out!

Attached is the updated patch, please use this one instead.

Thanks!

Duplicate functionality with the gspca_zc3xx driver, zc0301 only
supports 2 USB-ID's (because it only supports a limited set of
sensors) wich are also supported by the gspca_zc3xx driver
(which supports 53 USB-ID's in total).

Signed-off-by: Amerigo Wang <amwang@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Remove obsolete stv680 v4l1 driver
Amerigo Wang [Fri, 28 May 2010 09:49:57 +0000 (06:49 -0300)]
V4L/DVB: Remove obsolete stv680 v4l1 driver

obsolete v4l1 driver replaced by gspca_stv0680

Signed-off-by: Amerigo Wang <amwang@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Remove obsolete ovcamchip sensor framework
Amerigo Wang [Fri, 28 May 2010 09:45:38 +0000 (06:45 -0300)]
V4L/DVB: Remove obsolete ovcamchip sensor framework

Only used by obsoleted v4l1 driver

Signed-off-by: Amerigo Wang <amwang@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Remove obsolete w9968cf v4l1 driver
Amerigo Wang [Fri, 28 May 2010 09:41:07 +0000 (06:41 -0300)]
V4L/DVB: Remove obsolete w9968cf v4l1 driver

>From a97df96226e89d3539be93ddb5a8df3a2f7edcb6 Mon Sep 17 00:00:00 2001

obsolete v4l1 driver replaced by gspca_ov519

Signed-off-by: Amerigo Wang <amwang@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Remove obsolete ov511 driver
Amerigo Wang [Fri, 28 May 2010 09:31:39 +0000 (06:31 -0300)]
V4L/DVB: Remove obsolete ov511 driver

obsolete v4l1 driver replaced by gspca_ov519

Signed-off-by: Amerigo Wang <amwang@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Remove usbvideo quickcam_messenger driver
Amerigo Wang [Fri, 28 May 2010 09:26:32 +0000 (06:26 -0300)]
V4L/DVB: Remove usbvideo quickcam_messenger driver

obsolete v4l1 driver replaced by gspca_stv06xx

Signed-off-by: Amerigo Wang <amwang@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: videobuf: Rename vmalloc fields to vaddr
Laurent Pinchart [Tue, 11 May 2010 13:36:34 +0000 (10:36 -0300)]
V4L/DVB: videobuf: Rename vmalloc fields to vaddr

The videobuf_dmabuf and videobuf_vmalloc_memory fields have a vmalloc
field to store the kernel virtual address of vmalloc'ed buffers. Rename
the field to vaddr.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: videobuf: Remove videobuf_mapping start and end fields
Laurent Pinchart [Tue, 11 May 2010 13:36:33 +0000 (10:36 -0300)]
V4L/DVB: videobuf: Remove videobuf_mapping start and end fields

The fields are assigned but never used, remove them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: videobuf: Don't export videobuf_(vmalloc|pages)_to_sg
Laurent Pinchart [Tue, 11 May 2010 13:36:32 +0000 (10:36 -0300)]
V4L/DVB: videobuf: Don't export videobuf_(vmalloc|pages)_to_sg

Those functions are only called inside videobuf-dma-sg.c, make them
static.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Remove videobuf_sg_alloc abuse
Laurent Pinchart [Tue, 11 May 2010 13:36:31 +0000 (10:36 -0300)]
V4L/DVB: Remove videobuf_sg_alloc abuse

The cx88 and cx25821 drivers abuse videobuf_buffer to handle audio data.
Remove the abuse by creating private audio buffer structures with a
videobuf_dmabuf field.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: videobuf: Remove the videobuf_sg_dma_map/unmap functions
Laurent Pinchart [Tue, 11 May 2010 13:36:30 +0000 (10:36 -0300)]
V4L/DVB: videobuf: Remove the videobuf_sg_dma_map/unmap functions

Instead of creating dirty wrappers around videobuf_dma_map/unmap that
create a dummy videobuf_queue structure, modify videobuf_dma_map/unmap
to take a device pointer argument and use it directly. The
videobuf_sg_dma_map/unmap then become unused and can be removed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: videobuf: rename videobuf_mmap_free and add sanity checks
Pawel Osciak [Tue, 11 May 2010 13:36:29 +0000 (10:36 -0300)]
V4L/DVB: videobuf: rename videobuf_mmap_free and add sanity checks

This function is not specific to mmap, hence the rename.
Add a check whether we are not streaming or reading (for read mode that
uses the stream queue) before freeing anything.

Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: videobuf: rename videobuf_alloc to videobuf_alloc_vb
Pawel Osciak [Tue, 11 May 2010 13:36:28 +0000 (10:36 -0300)]
V4L/DVB: videobuf: rename videobuf_alloc to videobuf_alloc_vb

These functions allocate videobuf_buffer structures only. Renaming in order
to prevent confusion with functions allocating actual video buffer memory.

Rename the functions in videobuf-core.h videobuf-dma-sg.c as well.

Signed-off-by: Pawel Osciak <p.osciak@samsung.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media: Use memdup_user
Julia Lawall [Sat, 22 May 2010 08:21:02 +0000 (05:21 -0300)]
V4L/DVB: drivers/media: Use memdup_user

Use memdup_user when user data is immediately copied into the
allocated region.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
position p;
identifier l1,l2;
@@

-  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
+  to = memdup_user(from,size);
   if (
-      to==NULL
+      IS_ERR(to)
                 || ...) {
   <+... when != goto l1;
-  -ENOMEM
+  PTR_ERR(to)
   ...+>
   }
-  if (copy_from_user(to, from, size) != 0) {
-    <+... when != goto l2;
-    -EFAULT
-    ...+>
-  }
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx25821: Fix bad whitespacing
Mauro Carvalho Chehab [Sun, 4 Jul 2010 18:37:05 +0000 (15:37 -0300)]
V4L/DVB: cx25821: Fix bad whitespacing

Should use tabs for identation, and not whitespace

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx25821: Add a kernel level at printk's
Mauro Carvalho Chehab [Sun, 4 Jul 2010 18:28:09 +0000 (15:28 -0300)]
V4L/DVB: cx25821: Add a kernel level at printk's

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx25821: Make comments C99 compliant
Mauro Carvalho Chehab [Sun, 4 Jul 2010 18:21:40 +0000 (15:21 -0300)]
V4L/DVB: cx25821: Make comments C99 compliant

Replace all // comments by /* */

Patch generated with this small script:

for i in drivers/staging/cx25821/*.[ch]; do cat $i|perl -ne 's,//\s*(.*)\s*\n,/* $1 */\n,g; print $_;' >a && mv a $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: cx25821: Removed duplicate code and cleaned up
Palash Bandyopadhyay [Sun, 4 Jul 2010 17:15:38 +0000 (14:15 -0300)]
V4L/DVB: cx25821: Removed duplicate code and cleaned up

Signed-off-by: Palash Bandyopadhyay <Palash.Bandyopadhyay@conexant.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: DocBook/media: Add LIRC DocBook to media.html
Mauro Carvalho Chehab [Sun, 4 Jul 2010 15:23:19 +0000 (12:23 -0300)]
V4L/DVB: DocBook/media: Add LIRC DocBook to media.html

Add LIRC interface into the media.html DocBook, fixing several
small XML errors at the original spec.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR/lirc: add docbook info covering lirc device interface
Jarod Wilson [Sat, 3 Jul 2010 04:10:09 +0000 (01:10 -0300)]
V4L/DVB: IR/lirc: add docbook info covering lirc device interface

First ever crack at creating docbook documentation... Contains a bevy of
information on the various lirc device interface ioctls, as well as a
bit about the read and write interfaces.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR: add empty lirc pseudo-keymap
Jarod Wilson [Sat, 3 Jul 2010 04:08:52 +0000 (01:08 -0300)]
V4L/DVB: IR: add empty lirc pseudo-keymap

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR TX: incoming IR buffer now an int pointer
Jarod Wilson [Fri, 2 Jul 2010 03:38:09 +0000 (00:38 -0300)]
V4L/DVB: IR TX: incoming IR buffer now an int pointer

incoming IR buffer now an int pointer, and not fed from userspace

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR: add ir-core to lirc userspace decoder bridge driver
Jarod Wilson [Sat, 3 Jul 2010 04:07:53 +0000 (01:07 -0300)]
V4L/DVB: IR: add ir-core to lirc userspace decoder bridge driver

v2: copy of buffer data from userspace done inside this plugin/driver,
keeping the actual drivers minimal, and more flexible in what we can
deliver to them later on (they may be fed from within kernelspace later
on, by an in-kernel IR encoder).

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: IR: add lirc device interface
Jarod Wilson [Sat, 3 Jul 2010 04:06:57 +0000 (01:06 -0300)]
V4L/DVB: IR: add lirc device interface

v2: currently unused ioctls are included, but #if 0'd out

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/video/zoran: Use kmemdup
Julia Lawall [Thu, 1 Jul 2010 04:52:33 +0000 (01:52 -0300)]
V4L/DVB: drivers/media/video/zoran: Use kmemdup

Use kmemdup when some other buffer is immediately copied into the
allocated region.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
statement S;
@@

-  to = \(kmalloc\|kzalloc\)(size,flag);
+  to = kmemdup(from,size,flag);
   if (to==NULL || ...) S
-  memcpy(to, from, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: dvb-usb-init.c: white space changes in dvb-usb-init
Dan Carpenter [Thu, 1 Jul 2010 04:50:04 +0000 (01:50 -0300)]
V4L/DVB: dvb-usb-init.c: white space changes in dvb-usb-init

I started fixing one or two lines, but after a while I got into a groove
and started changing everything.  I left the lines longer than 80
characters because that seemed to be the style in this file.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/video/tlg2300: Use kmemdup
Julia Lawall [Thu, 1 Jul 2010 04:41:44 +0000 (01:41 -0300)]
V4L/DVB: drivers/media/video/tlg2300: Use kmemdup

Use kmemdup when some other buffer is immediately copied into the
allocated region.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
statement S;
@@

-  to = \(kmalloc\|kzalloc\)(size,flag);
+  to = kmemdup(from,size,flag);
   if (to==NULL || ...) S
-  memcpy(to, from, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Increment DVB API version
Mauro Carvalho Chehab [Sat, 3 Jul 2010 21:06:13 +0000 (18:06 -0300)]
V4L/DVB: Increment DVB API version

A new flag were added at the Frontend capabilities. Increment
API minor revision.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: DocBook/dvb: Update spec to reflect the current FE capabilities
Mauro Carvalho Chehab [Sat, 3 Jul 2010 20:39:17 +0000 (17:39 -0300)]
V4L/DVB: DocBook/dvb: Update spec to reflect the current FE capabilities

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: Add FE_CAN_TURBO_FEC
Klaus Schmidinger [Thu, 1 Jul 2010 04:37:34 +0000 (01:37 -0300)]
V4L/DVB: Add FE_CAN_TURBO_FEC

Some (North American) providers use a non-standard mode called
"8psk turbo fec". Since there is no flag in the driver that
would allow an application to determine whether a particular
device can handle "turbo fec", the attached patch introduces
FE_CAN_TURBO_FEC.

Since there is no flag in the SI data that would indicate
that a transponder uses "turbo fec", VDR will assume that
all 8psk transponders on DVB-S use "turbo fec".

Tested-by: Derek Kelly <user.vdr@gmail.com>
Signed-off-by: Klaus Schmidinger <Klaus.Schmidinger@tvdr.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/video/uvc: Use kmemdup
Julia Lawall [Thu, 1 Jul 2010 04:33:15 +0000 (01:33 -0300)]
V4L/DVB: drivers/media/video/uvc: Use kmemdup

Use kmemdup when some other buffer is immediately copied into the
allocated region.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
statement S;
@@

-  to = \(kmalloc\|kzalloc\)(size,flag);
+  to = kmemdup(from,size,flag);
   if (to==NULL || ...) S
-  memcpy(to, from, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/video/gspca: Use kmemdup
Julia Lawall [Thu, 1 Jul 2010 04:30:11 +0000 (01:30 -0300)]
V4L/DVB: drivers/media/video/gspca: Use kmemdup

Use kmemdup when some other buffer is immediately copied into the
allocated region.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
statement S;
@@

-  to = \(kmalloc\|kzalloc\)(size,flag);
+  to = kmemdup(from,size,flag);
   if (to==NULL || ...) S
-  memcpy(to, from, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/dvb/dvb-usb/dib0700: CodingStyle fixes
Daniel Mack [Thu, 1 Jul 2010 04:19:31 +0000 (01:19 -0300)]
V4L/DVB: drivers/media/dvb/dvb-usb/dib0700: CodingStyle fixes

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/dvb/dvb-usb/dib0700: fix return values
Daniel Mack [Thu, 1 Jul 2010 04:08:58 +0000 (01:08 -0300)]
V4L/DVB: drivers/media/dvb/dvb-usb/dib0700: fix return values

Propagte correct error values instead of returning -1 which just means
-EPERM ("Permission denied")

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: drivers/media/video/pvrusb2: Add missing mutex_unlock
Julia Lawall [Tue, 29 Jun 2010 04:42:53 +0000 (01:42 -0300)]
V4L/DVB: drivers/media/video/pvrusb2: Add missing mutex_unlock

Add a mutex_unlock missing on the error path.  In the other functions in
the same file the locks and unlocks of this mutex appear to be balanced,
so it would seem that the same should hold in this case.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression E1;
@@

* mutex_lock(E1,...);
  <+... when != E1
  if (...) {
    ... when != E1
*   return ...;
  }
  ...+>
* mutex_unlock(E1,...);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: vivi: fix depends again
Randy Dunlap [Tue, 29 Jun 2010 04:31:40 +0000 (01:31 -0300)]
V4L/DVB: vivi: fix depends again

My previous patch to depend on FONTS was not sufficient since
FONTS is boolean.  VIDEO_VIVI needs to depend on a tristate so that
it won't be enabled as =y when framebuffer is built as modular, so
modify it to depend on the same symbols that FONTS depends on, which
are FRAMEBUFFER_CONSOLE || STI_CONSOLE.

Fixes this build error when VIDEO_VIVI=y and FRAMEBUFFER_CONSOLE=m:
vivi.c:(.init.text+0x7205): undefined reference to `find_font'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB: smscoreapi/w9968cf: drivers/media: Remove unnecesary kmalloc casts
Joe Perches [Tue, 29 Jun 2010 04:29:29 +0000 (01:29 -0300)]
V4L/DVB: smscoreapi/w9968cf: drivers/media: Remove unnecesary kmalloc casts

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>