platform/kernel/linux-stable.git
11 years ago[media] v4l2-ctrls: add a notify callback
Hans Verkuil [Fri, 7 Sep 2012 07:46:39 +0000 (04:46 -0300)]
[media] v4l2-ctrls: add a notify callback

Sometimes platform/bridge drivers need to be notified when a control from
a sub-device changes value. In order to support this a notify callback was
added.
[dheitmueller@kernellabs.com: fix merge conflict in v4l2-ctrls.c]

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: fix tuner/frequency handling
Hans Verkuil [Thu, 6 Sep 2012 13:07:25 +0000 (10:07 -0300)]
[media] em28xx: fix tuner/frequency handling

v4l2-compliance found problems with frequency clamping that wasn't
reported correctly and missing tuner index checks.
Also removed unnecessary tuner type checks (these are now done by the
v4l2 core).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: fix VIDIOC_DBG_G_CHIP_IDENT compliance errors
Hans Verkuil [Thu, 6 Sep 2012 12:53:08 +0000 (09:53 -0300)]
[media] em28xx: fix VIDIOC_DBG_G_CHIP_IDENT compliance errors

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: remove bogus input/audio ioctls for the radio device
Hans Verkuil [Thu, 6 Sep 2012 12:23:03 +0000 (09:23 -0300)]
[media] em28xx: remove bogus input/audio ioctls for the radio device

Radio devices should not implement those ioctls.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: fix querycap
Hans Verkuil [Thu, 6 Sep 2012 10:31:04 +0000 (07:31 -0300)]
[media] em28xx: fix querycap

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: tell ir-kbd-i2c that WinTV uses an RC5 protocol
Mauro Carvalho Chehab [Fri, 4 Jan 2013 21:01:59 +0000 (18:01 -0300)]
[media] em28xx: tell ir-kbd-i2c that WinTV uses an RC5 protocol

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: simplify IR names on I2C devices
Mauro Carvalho Chehab [Fri, 4 Jan 2013 20:37:26 +0000 (17:37 -0300)]
[media] em28xx: simplify IR names on I2C devices

The ir-i2c-kbd already adds I2C IR before the name. The way it is,
the devices are named as:
"i2c IR (i2c IR (EM2840 Hauppaug"
With is ugly and incorrect. After this patch, it is now properly
displayed as:
"i2c IR (WinTV USB2)"

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: autoload em28xx-rc if the device has an I2C IR
Mauro Carvalho Chehab [Fri, 4 Jan 2013 20:32:58 +0000 (17:32 -0300)]
[media] em28xx: autoload em28xx-rc if the device has an I2C IR

If the device has an I2C IR, em28xx-rc should be loaded by default,
except if the user explicitly requested to not load, via modprobe
option.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: initialize button/I2C IR earlier
Mauro Carvalho Chehab [Fri, 4 Jan 2013 20:27:47 +0000 (17:27 -0300)]
[media] em28xx: initialize button/I2C IR earlier

The em28xx-input is used by 3 different types of input devices:
- devices with buttons (like cameras and grabber devices);
- devices with I2C remotes;
- em2860 or latter chips with RC support embedded.
When the device has an I2C remote, all it needs to do is to call
the proper I2C driver (ir-i2c-kbd), passing the proper data to
it, and just leave the code.
Also, button devices have its own init code that doesn't depend on
having an IR or not (as a general rule, they don't have).
So, move its init code to fix bugs introduced by earlier patches
that prevent them to work.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] get_dvb_firmware: Fix the location of firmware for Terratec HTC
Martin Blumenstingl [Tue, 1 Jan 2013 11:54:26 +0000 (08:54 -0300)]
[media] get_dvb_firmware: Fix the location of firmware for Terratec HTC

Fix firmware download for the Terratec Cinergy HTC Stick HD. The file
was moved on the server.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] lmedm04: correct I2C values to 7 bit addressing
Malcolm Priestley [Sat, 29 Dec 2012 10:34:24 +0000 (07:34 -0300)]
[media] lmedm04: correct I2C values to 7 bit addressing

The separation the lmedm04 fails on the ts2020 portion because the correct
I2C addressing.
So, it's time to correct the addressing in the remainder of lmedm04.
Tested all tuners.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] stk1160: Replace BUG_ON with WARN_ON
Ezequiel Garcia [Fri, 23 Nov 2012 11:12:35 +0000 (08:12 -0300)]
[media] stk1160: Replace BUG_ON with WARN_ON

This situation is not even an error condition so it's stupid to BUG_ON.
Learn the lesson:
http://permalink.gmane.org/gmane.linux.kernel/1347333

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] m88rs2000: make use ts2020
Igor M. Liplianin [Fri, 28 Dec 2012 22:40:33 +0000 (19:40 -0300)]
[media] m88rs2000: make use ts2020

Tuner part of Montage rs2000 chip is similar to ts2020 tuner.
Patch to use ts2020 code.

[mchehab@redhat.com: a few CodingStyle fixes]
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ds3000: lock led procedure added
Igor M. Liplianin [Fri, 28 Dec 2012 22:40:24 +0000 (19:40 -0300)]
[media] ds3000: lock led procedure added

TeVii s660 and others have LED for lock indication.
Let's use it in right order.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] m88rs2000: SNR, BER implemented
Igor M. Liplianin [Fri, 28 Dec 2012 22:40:16 +0000 (19:40 -0300)]
[media] m88rs2000: SNR, BER implemented

Trivial patch to implement SNR, BER, UCB counter for Montage rs2000 demod.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] dw2102: autoselect DVB_M88RS2000
Igor M. Liplianin [Fri, 28 Dec 2012 22:40:04 +0000 (19:40 -0300)]
[media] dw2102: autoselect DVB_M88RS2000

Patch to select rs2000 module to compile automatically for TeVii
S421 and S632 cards.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] vivi: Constify structures
Kirill Smelkov [Wed, 26 Dec 2012 15:23:26 +0000 (12:23 -0300)]
[media] vivi: Constify structures

Most of *_ops and other structures in vivi.c were already declared const
but some have not. Constify and code/data will take less space:
    $ size drivers/media/platform/vivi.o
              text    data     bss     dec     hex filename
    before:  12569     248       8   12825    3219 drivers/media/platform/vivi.o
    after:   12308      20       8   12336    3030 drivers/media/platform/vivi.o
i.e. vivi.o is now ~500 bytes less.

Signed-off-by: Kirill Smelkov <kirr@navytux.spb.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[hid] usb hid quirks for Masterkit MA901 usb radio
Alexey Klimov [Mon, 12 Nov 2012 05:57:03 +0000 (02:57 -0300)]
[hid] usb hid quirks for Masterkit MA901 usb radio

Don't let Masterkit MA901 USB radio be handled by usb hid drivers.
This device will be handled by radio-ma901.c driver.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: add driver for Masterkit MA901 usb radio
Alexey Klimov [Mon, 12 Nov 2012 05:56:37 +0000 (02:56 -0300)]
[media] media: add driver for Masterkit MA901 usb radio

This patch creates a new usb-radio driver, radio-ma901.c, that supports
Masterkit MA 901 USB FM radio devices. This device plugs into both the
USB and an analog audio input or headphones, so this thing only deals
with initialization and frequency setting.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] blackfin Kconfig: select is evil; use, instead depends on
Mauro Carvalho Chehab [Thu, 27 Dec 2012 23:21:14 +0000 (21:21 -0200)]
[media] blackfin Kconfig: select is evil; use, instead depends on

Select is evil as it has issues with dependencies. Better to convert
it to use depends on.

That fixes a breakage with out-of-tree compilation of the media
tree.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s3c-camif: Add missing version.h header file
Sachin Kamat [Mon, 3 Dec 2012 05:44:31 +0000 (02:44 -0300)]
[media] s3c-camif: Add missing version.h header file

versioncheck script complains about missing linux/version.h header
file.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] mantis: cleanup NULL checking in mantis_ca_exit()
Dan Carpenter [Sun, 2 Dec 2012 09:43:13 +0000 (06:43 -0300)]
[media] mantis: cleanup NULL checking in mantis_ca_exit()

Smatch complainst that the call to mantis_evmgr_exit() dereferences "ca"
but then we check it for NULL on the next line.  I've moved the NULL
check forward to avoid that.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] TeVii DVB-S s421 and s632 cards support, rs2000 part
Igor M. Liplianin [Tue, 8 May 2012 07:08:04 +0000 (04:08 -0300)]
[media] TeVii DVB-S s421 and s632 cards support, rs2000 part

One register needs to be changed to TS to work. So we use separate inittab.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Acked-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] TeVii DVB-S s421 and s632 cards support
Igor M. Liplianin [Tue, 8 May 2012 06:53:17 +0000 (03:53 -0300)]
[media] TeVii DVB-S s421 and s632 cards support

DVB-S chip is Montage m88rs2000, so initial patch is simple.

Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ds3000: bail out early on i2c failures during firmware load
Rémi Cardona [Fri, 28 Sep 2012 11:59:29 +0000 (08:59 -0300)]
[media] ds3000: bail out early on i2c failures during firmware load

- if kmalloc() returns NULL, we can return immediately without trying
   to kfree() a NULL pointer.
 - if i2c_transfer() fails, error out immediately instead of trying to
   upload the remaining bytes of the firmware.
 - the error code is then properly propagated down to ds3000_initfe().

Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: rename module parameter prefer_bulk to usb_xfer_mode
Frank Schaefer [Wed, 26 Dec 2012 18:12:37 +0000 (15:12 -0300)]
[media] em28xx: rename module parameter prefer_bulk to usb_xfer_mode

Since we have now 3 modes (auto/isoc/bulk), usb_xfer_mode is more suitable than prefer_bulk.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ts2020: fix two warnings added by changeset 73f0af4
Mauro Carvalho Chehab [Thu, 27 Dec 2012 21:35:44 +0000 (19:35 -0200)]
[media] ts2020: fix two warnings added by changeset 73f0af4

drivers/media/dvb-frontends/ts2020.c: In function 'ts2020_set_params':
drivers/media/dvb-frontends/ts2020.c:126:47: warning: variable 'div4' set but not used [-Wunused-but-set-variable]
drivers/media/dvb-frontends/ts2020.c: At top level:
drivers/media/dvb-frontends/ts2020.c:262:5: warning: no previous prototype for 'ts2020_get_signal_strength' [-Wmissing-prototypes]

Cc: Konstantin Dimitrov <kosio.dimitrov@gmail.com>
Cc: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] make the other drivers take use of the new ts2020 driver
Konstantin Dimitrov [Sun, 23 Dec 2012 22:25:38 +0000 (19:25 -0300)]
[media] make the other drivers take use of the new ts2020 driver

make the other drivers take use of the separate ts2020 driver

Signed-off-by: Konstantin Dimitrov <kosio.dimitrov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ts2020: add ts2020 tuner driver
Konstantin Dimitrov [Sun, 23 Dec 2012 22:25:27 +0000 (19:25 -0300)]
[media] ts2020: add ts2020 tuner driver

add separate ts2020 tuner driver

Signed-off-by: Konstantin Dimitrov <kosio.dimitrov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ds3000: remove ts2020 tuner related code
Konstantin Dimitrov [Sun, 23 Dec 2012 22:25:09 +0000 (19:25 -0300)]
[media] ds3000: remove ts2020 tuner related code

remove ts2020 tuner related code from ds3000 driver
prepare ds3000 driver for using external tuner driver

Signed-off-by: Konstantin Dimitrov <kosio.dimitrov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] it913x: add support for Avermedia A835B
Eddi De Pieri [Sat, 22 Dec 2012 12:41:49 +0000 (09:41 -0300)]
[media] it913x: add support for Avermedia A835B

Add support for Avermedia A835B and variants.

Signed-off-by: Eddi De Pieri <eddi@depieri.net>
Cc: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] m2m-deinterlace: use correct check for kzalloc failure
Sasha Levin [Thu, 20 Dec 2012 18:11:18 +0000 (15:11 -0300)]
[media] m2m-deinterlace: use correct check for kzalloc failure

There is no point in PTR_ERR()ing a NULL pointer, use a real error
instead.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] wl128x: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:26 +0000 (15:57 -0300)]
[media] wl128x: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] radio-wl1273: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:25 +0000 (15:57 -0300)]
[media] radio-wl1273: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] dvb-frontends: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:24 +0000 (15:57 -0300)]
[media] dvb-frontends: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] dvb-core: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:23 +0000 (15:57 -0300)]
[media] dvb-core: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] bttv: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:22 +0000 (15:57 -0300)]
[media] bttv: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx18: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:21 +0000 (15:57 -0300)]
[media] cx18: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx23885: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:20 +0000 (15:57 -0300)]
[media] cx23885: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Reviewed-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx88: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:19 +0000 (15:57 -0300)]
[media] cx88: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ivtv: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:18 +0000 (15:57 -0300)]
[media] ivtv: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tuners/tda18271: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:17 +0000 (15:57 -0300)]
[media] tuners/tda18271: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tuners/xc2028: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:16 +0000 (15:57 -0300)]
[media] tuners/xc2028: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] tuners/xc4000: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:15 +0000 (15:57 -0300)]
[media] tuners/xc4000: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] au0828: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:14 +0000 (15:57 -0300)]
[media] au0828: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] dvb-usb/friio-fe: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:13 +0000 (15:57 -0300)]
[media] dvb-usb/friio-fe: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] zr36067: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:12 +0000 (15:57 -0300)]
[media] zr36067: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx25840: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:11 +0000 (15:57 -0300)]
[media] cx25840: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] hdpvr: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:10 +0000 (15:57 -0300)]
[media] hdpvr: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] pvrusb2: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:09 +0000 (15:57 -0300)]
[media] pvrusb2: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] pwc: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:08 +0000 (15:57 -0300)]
[media] pwc: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] sn9c102: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:07 +0000 (15:57 -0300)]
[media] sn9c102: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] usbvision: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:06 +0000 (15:57 -0300)]
[media] usbvision: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx231xx: Replace memcpy with struct assignment
Ezequiel Garcia [Tue, 23 Oct 2012 18:57:05 +0000 (15:57 -0300)]
[media] cx231xx: Replace memcpy with struct assignment

This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Improve media Kconfig menu
Hans Verkuil [Sat, 22 Dec 2012 10:48:58 +0000 (07:48 -0300)]
[media] Improve media Kconfig menu

I've always found it very confusing that the "Media ancillary drivers (tuners,
sensors, i2c, frontends)" comment came after the "Autoselect" option. This patch
moves it up and changes the "Autoselect" text to correspond more closely to
the "Media ancillary drivers" comment.
It also fixes two typos.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] bttv: avoid flooding the kernel log when i2c debugging is disabled
John Törnblom [Mon, 17 Dec 2012 11:53:54 +0000 (08:53 -0300)]
[media] bttv: avoid flooding the kernel log when i2c debugging is disabled

When the bttv driver is running without i2c_debug being set, the kernel
log is being flooded with the string ">". This string is really a part of
a debug message that is logged using several substrings protected by a
conditional check.
This patch adds the same conditional check to the leaked substring.

Signed-off-by: John Törnblom <john.tornblom@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap3isp: ispqueue: Fix uninitialized variable compiler warnings
Laurent Pinchart [Mon, 17 Dec 2012 07:52:48 +0000 (04:52 -0300)]
[media] omap3isp: ispqueue: Fix uninitialized variable compiler warnings

drivers/media/platform/omap3isp/ispqueue.c:399:18: warning: 'pa' may be
used uninitialized in this function [-Wuninitialized]
This is a false positive but the compiler has no way to know about it,
so initialize the variable to 0.
drivers/media/platform/omap3isp/ispqueue.c:445:6: warning:
'vm_page_prot' may be used uninitialized in this function
[-Wuninitialized]
This is a false positive and the compiler should know better. Use
uninitialized_var().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ngene: separate demodulator and tuner attach
Patrice Chotard [Sat, 15 Dec 2012 22:11:43 +0000 (19:11 -0300)]
[media] ngene: separate demodulator and tuner attach

Previously, demodulator and tuner attach was done in the
demod_attach callback. Migrate the tuner part in the
tuner_attach callback in ngene_info to do thing in right place.

Signed-off-by: Patrice Chotard <patricechotard@free.fr>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] drxd: allow functional gate control after, attach
Patrice Chotard [Sat, 15 Dec 2012 22:11:28 +0000 (19:11 -0300)]
[media] drxd: allow functional gate control after, attach

Previously, gate control didn't work until drxd_init()
execution. Migrate necessary set of commands in drxd_attach
to allow gate control to be used by tuner which are
accessible through i2c gate.

Reported-by: frederic.mantegazza@gbiloba.org
Signed-off-by: Patrice Chotard <patricechotard@free.fr>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] marvell-ccic: use internal variable replace global frame stats variable
Libin Yang [Sat, 15 Dec 2012 08:57:50 +0000 (05:57 -0300)]
[media] marvell-ccic: use internal variable replace global frame stats variable

This patch replaces the global frame stats variables by using
internal variables in mcam_camera structure.

Signed-off-by: Albert Wang <twang13@marvell.com>
Signed-off-by: Libin Yang <lbyang@marvell.com>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media/rc: fix oops on unloading module rc-core
Konstantin Khlebnikov [Fri, 14 Dec 2012 10:02:48 +0000 (07:02 -0300)]
[media] media/rc: fix oops on unloading module rc-core

During modiles initialization rc-core schedules work which calls
request_module() several times to load ir-*-decoder modules, but
it does not wait or cancel this work on module unloading.
rc-core should use request_module_nowait() instead, because it
anyway cannot load modules synchronously or cancel/wait pending
work on unloading, because this leads to deadlock on modules_mutex
between several "modprobe" processes.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap3isp: csiphy: Fix an uninitialized variable compiler warning
Laurent Pinchart [Tue, 11 Dec 2012 12:11:52 +0000 (09:11 -0300)]
[media] omap3isp: csiphy: Fix an uninitialized variable compiler warning

drivers/media/platform/omap3isp/ispcsiphy.c: In function
‘csiphy_routing_cfg’:
drivers/media/platform/omap3isp/ispcsiphy.c:71:57: warning: ‘shift’
may be used uninitialized in this function [-Wuninitialized]
drivers/media/platform/omap3isp/ispcsiphy.c:40:6: note: ‘shift’ was
declared here
The warning is a false positive but the compiler is right in
complaining. Fix it by using the correct enum data type for the iface
argument and adding a default case in the switch statement.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] media: saa7146: don't use mutex_lock_interruptible() in device_release()
Cyril Roelandt [Tue, 11 Dec 2012 02:05:28 +0000 (23:05 -0300)]
[media] media: saa7146: don't use mutex_lock_interruptible() in device_release()

Use uninterruptible mutex_lock in the release() file op to make sure all
resources are properly freed when a process is being terminated. Returning
-ERESTARTSYS has no effect for a terminating process and this may cause driver
resources not to be released.
This was found using the following semantic patch (http://coccinelle.lip6.fr/):
<spml>
@r@
identifier fops;
identifier release_func;
@@
static const struct v4l2_file_operations fops = {
.release = release_func
};
@depends on r@
identifier r.release_func;
expression E;
@@
static int release_func(...)
{
...
- if (mutex_lock_interruptible(E)) return -ERESTARTSYS;
+ mutex_lock(E);
...
}
</spml>

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: Add an entry for the ad3645a LED flash controller driver
Laurent Pinchart [Mon, 10 Dec 2012 23:38:24 +0000 (20:38 -0300)]
[media] MAINTAINERS: Add an entry for the ad3645a LED flash controller driver

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] MAINTAINERS: Add entries for Aptina sensor drivers
Laurent Pinchart [Mon, 10 Dec 2012 23:38:23 +0000 (20:38 -0300)]
[media] MAINTAINERS: Add entries for Aptina sensor drivers

Add an entry for the mt9m032, mt9p031, mt9t001 and mt9v032 Aptina sensor
drivers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] m920x: add support for the VP-7049 Twinhan DVB-T USB Stick
Antonio Ospite [Mon, 10 Dec 2012 20:37:17 +0000 (17:37 -0300)]
[media] m920x: add support for the VP-7049 Twinhan DVB-T USB Stick

This device was originally made by Twinhan/Azurewave[1] and sometimes
named DTV-DVB UDTT7049, it could be also found in Italy under the name
of Digicom Digitune-S[2], or Think Xtra Hollywood DVB-T USB2.0[3].
Components:
  Usb bridge: ULi M9206
  Frontend: MT352CG
  Tuner: MT2060F
The firmware can be downloaded with:
$ ./Documentation/dvb/get_dvb_firmware vp7049
[1] http://www.azurewave.com/Support_Utility_Driver.asp
[2] http://www.digicom.it/digisit/driver_link.nsf/driverprodotto?openform&prodotto=DigiTuneS
[3] http://www.txitalia.it/prodotto.asp?prodotto=txhollywooddvttv

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] get_dvb_firmware: add entry for the vp7049 firmware
Antonio Ospite [Mon, 10 Dec 2012 20:37:16 +0000 (17:37 -0300)]
[media] get_dvb_firmware: add entry for the vp7049 firmware

Add an entry to download the dvb-usb-vp7049-0.95.fw firmware for the
Twinhan vp7049 and similar devices.
Known devices of this kind are:
  Twinhan/Azurewave DTV-DVB UDTT7049
  Digicom Digitune-S
  Think Xtra Hollywood DVB-T USB2.0

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] m920x: send the RC init sequence also when rc.core is used
Antonio Ospite [Mon, 10 Dec 2012 20:37:15 +0000 (17:37 -0300)]
[media] m920x: send the RC init sequence also when rc.core is used

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] m920x: Fix CodingStyle issues
Mauro Carvalho Chehab [Thu, 27 Dec 2012 18:32:58 +0000 (16:32 -0200)]
[media] m920x: Fix CodingStyle issues

Fix CodingStyle issues introduced by the last patch

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] m920x: introduce m920x_rc_core_query()
Antonio Ospite [Mon, 10 Dec 2012 20:37:14 +0000 (17:37 -0300)]
[media] m920x: introduce m920x_rc_core_query()

Add an m920x_rc_core_query() function for drivers which want to use the
linux RC core infrastructure.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] m920x: avoid repeating RC state parsing at each keycode
Antonio Ospite [Mon, 10 Dec 2012 20:37:13 +0000 (17:37 -0300)]
[media] m920x: avoid repeating RC state parsing at each keycode

Parsing the RC press state is invariant wrt. the keycode, take it out of
the keycode scanning loop.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] m920x: factor out a m920x_parse_rc_state() function
Antonio Ospite [Mon, 10 Dec 2012 20:37:12 +0000 (17:37 -0300)]
[media] m920x: factor out a m920x_parse_rc_state() function

This is in preparation to using RC core infrastructure for some devices,
the RC button state parsing logic can be shared berween rc.legacy and
rc.core callbacks as it is independent from the mechanism used for RC
handling.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] m920x: factor out a m920x_write_seq() function
Antonio Ospite [Mon, 10 Dec 2012 20:37:11 +0000 (17:37 -0300)]
[media] m920x: factor out a m920x_write_seq() function

This is in preparation for the vp7049 frontend attach function which is
going to set a sequence of registers as well.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] m920x: fix a typo in a comment
Antonio Ospite [Mon, 10 Dec 2012 20:37:10 +0000 (17:37 -0300)]
[media] m920x: fix a typo in a comment

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] dvb-usb: fix indentation of a for loop
Antonio Ospite [Mon, 10 Dec 2012 20:37:09 +0000 (17:37 -0300)]
[media] dvb-usb: fix indentation of a for loop

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] saa7134: Add pm_qos_request to fix video corruption
Simon Farnsworth [Mon, 10 Dec 2012 11:35:09 +0000 (08:35 -0300)]
[media] saa7134: Add pm_qos_request to fix video corruption

The SAA7134 appears to have trouble buffering more than one line of video
when doing DMA. Rather than try to fix the driver to cope (as has been done
by Andy Walls for the cx18 driver), put in a pm_qos_request to limit deep
sleep exit latencies.
The visible effect of not having this is that seemingly random lines are
only partly transferred - if you feed in a static image, you see a portion
of the image "flicker" into place.

[mchehab@redhat.com: Fix ABI breakage due to some renames at pm_qos]
Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] Added support for AVerTV Hybrid Express Slim HC81R
Oleh Kravchenko [Sat, 8 Dec 2012 21:20:59 +0000 (18:20 -0300)]
[media] Added support for AVerTV Hybrid Express Slim HC81R

This patch provide only analog support.
The device is based on AF9013 demodulator, XC3028 tuner
and CX23885 chipset; subsystem id: 1461:d939

Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] dvb: push down ioctl lock in dvb_usercopy
Nikolaus Schulz [Sun, 23 Dec 2012 21:49:07 +0000 (18:49 -0300)]
[media] dvb: push down ioctl lock in dvb_usercopy

Since most dvb ioctls wrap their real work with dvb_usercopy, the static mutex
used in dvb_usercopy effectively is a global lock for dvb ioctls.
Unfortunately, frontend ioctls can be blocked by the frontend thread for
several seconds; this leads to unacceptable lock contention.  Mitigate that by
pushing the mutex from dvb_usercopy down to the individual, device specific
ioctls.
There are 10 such ioctl functions using dvb_usercopy, either calling it
directly, or via the trivial wrapper dvb_generic_ioctl. The following already
employ their own locking and look safe:
    • dvb_demux_ioctl           (as per dvb_demux_do_ioctl)
    • dvb_dvr_ioctl             (as per dvb_dvr_do_ioctl)
    • dvb_osd_ioctl             (as per single non-trivial callee)
    • fdtv_ca_ioctl             (as per callees)
    • dvb_frontend_ioctl
The following functions do not, and are thus changed to use a device specific
mutex:
    • dvb_net_ioctl             (as per dvb_net_do_ioctl)
    • dvb_ca_en50221_io_ioctl   (as per dvb_ca_en50221_io_do_ioctl)
    • dvb_video_ioctl
    • dvb_audio_ioctl
    • dvb_ca_ioctl

Signed-off-by: Nikolaus Schulz <schulz@macnetix.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] dvb_frontend: fix ioctls failing if frontend open/closed too fast
Juergen Lock [Sun, 23 Dec 2012 20:23:06 +0000 (17:23 -0300)]
[media] dvb_frontend: fix ioctls failing if frontend open/closed too fast

That likely fixes this MythTV ticket:
http://code.mythtv.org/trac/ticket/10830
(which btw affects all usb tuners I tested as well, pctv452e,
dib0700, af9015)  pctv452e is still possibly broken with MythTV
even after this fix; it does work with VDR here tho despite I2C
errors.
Reduced testcase:
http://people.freebsd.org/~nox/tmp/ioctltst.c
Thanx to devinheitmueller and crope from #linuxtv for helping with
this fix! :)

Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-jpeg: convert struct spinlock to spinlock_t
Luis R. Rodriguez [Thu, 29 Nov 2012 19:45:08 +0000 (16:45 -0300)]
[media] s5p-jpeg: convert struct spinlock to spinlock_t

spinlock_t should always be used.
Could not get this to build with allmodconfig:
mcgrof@frijol ~/linux-next (git::(no branch))$ make C=1 M=drivers/media/platform/s5p-jpeg
  WARNING: Symbol version dump /home/mcgrof/linux-next/Module.symvers
           is missing; modules will have no dependencies and modversions.
  Building modules, stage 2.
  MODPOST 0 modules

Reported-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-fimc: convert struct spinlock to spinlock_t
Luis R. Rodriguez [Thu, 29 Nov 2012 19:45:07 +0000 (16:45 -0300)]
[media] s5p-fimc: convert struct spinlock to spinlock_t

spinlock_t should always be used.
Could not get this to build with allmodconfig:
mcgrof@frijol ~/linux-next (git::(no branch))$ make C=1 M=drivers/media/platform/s5p-fimc/
  WARNING: Symbol version dump /home/mcgrof/linux-next/Module.symvers
           is missing; modules will have no dependencies and modversions.
  LD      drivers/media/platform/s5p-fimc/built-in.o
  Building modules, stage 2.
  MODPOST 0 modules

Reported-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] omap: Fix Kconfig dependencies on OMAP2
Mauro Carvalho Chehab [Thu, 27 Dec 2012 16:46:55 +0000 (14:46 -0200)]
[media] omap: Fix Kconfig dependencies on OMAP2

Resolves the following warning that appears with allmodconfig on -arm:
warning: (VIDEO_OMAP2_VOUT && DRM_OMAP) selects OMAP2_DSS which has unmet direct dependencies (HAS_IOMEM && ARCH_OMAP2PLUS)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] ttpci: Fix a missing Kconfig dependency
Mauro Carvalho Chehab [Thu, 27 Dec 2012 16:43:41 +0000 (14:43 -0200)]
[media] ttpci: Fix a missing Kconfig dependency

Fix a Kconfig warning that appears with allmodconfig on arm:

warning: (DVB_USB_PCTV452E) selects TTPCI_EEPROM which has unmet direct dependencies (MEDIA_SUPPORT && MEDIA_PCI_SUPPORT && MEDIA_DIGITAL_TV_SUPPORT && I2C)

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx231xx : Add support for Elgato Video Capture V2
Alf Høgemark [Wed, 28 Nov 2012 17:29:16 +0000 (14:29 -0300)]
[media] cx231xx : Add support for Elgato Video Capture V2

This patch adds support for the Elgato Video Capture, version 2, device.
The device is added based on the code for CX231XX_BOARD_HAUPPAUGE_USBLIVE2,
it is simply a copy of the code for that board, with the proper USB device
info for the Elgato Video Capture V2 device.

Signed-off-by: Alf Høgemark <alf@i100.no>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rc: unlock on error in store_protocols()
Dan Carpenter [Tue, 27 Nov 2012 16:35:30 +0000 (13:35 -0300)]
[media] rc: unlock on error in store_protocols()

This error path is missing the unlock.

[mchehab@redhat.com: Merged two equal patches into one]
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoMerge tag 'v3.8-rc1' into staging/for_v3.9
Mauro Carvalho Chehab [Thu, 27 Dec 2012 14:44:11 +0000 (12:44 -0200)]
Merge tag 'v3.8-rc1' into staging/for_v3.9

Linux 3.8-rc1

* tag 'v3.8-rc1': (10696 commits)
  Linux 3.8-rc1
  Revert "nfsd: warn on odd reply state in nfsd_vfs_read"
  ARM: dts: fix duplicated build target and alphabetical sort out for exynos
  dm stripe: add WRITE SAME support
  dm: remove map_info
  dm snapshot: do not use map_context
  dm thin: dont use map_context
  dm raid1: dont use map_context
  dm flakey: dont use map_context
  dm raid1: rename read_record to bio_record
  dm: move target request nr to dm_target_io
  dm snapshot: use per_bio_data
  dm verity: use per_bio_data
  dm raid1: use per_bio_data
  dm: introduce per_bio_data
  dm kcopyd: add WRITE SAME support to dm_kcopyd_zero
  dm linear: add WRITE SAME support
  dm: add WRITE SAME support
  dm: prepare to support WRITE SAME
  dm ioctl: use kmalloc if possible
  ...

Conflicts:
MAINTAINERS

11 years ago[media] rc: unlock on error in show_protocols()
Dan Carpenter [Tue, 27 Nov 2012 16:35:09 +0000 (13:35 -0300)]
[media] rc: unlock on error in show_protocols()

We recently introduced a new return -ENODEV in this function but we need
to unlock before returning.

[mchehab@redhat.com: found two patches with the same fix. Merged SOB's/acks into one patch]
Acked-by: Herton R. Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Douglas Bagnall <douglas@paradise.net.nz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l2: blackfin: add EPPI3 support
Scott Jiang [Tue, 20 Nov 2012 18:49:36 +0000 (15:49 -0300)]
[media] v4l2: blackfin: add EPPI3 support

Bf60x soc has a new PPI called Enhanced PPI version 3.
HD video is supported now. To achieve this, we redesign
ppi params and add dv timings feature.

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] v4l2: blackfin: convert ppi driver to a module
Scott Jiang [Tue, 20 Nov 2012 18:49:35 +0000 (15:49 -0300)]
[media] v4l2: blackfin: convert ppi driver to a module

Other drivers can make use of it.

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] vivi: Teach it to tune FPS
Kirill Smelkov [Tue, 23 Oct 2012 12:56:59 +0000 (09:56 -0300)]
[media] vivi: Teach it to tune FPS

I was testing my video-over-ethernet subsystem recently, and vivi
seemed to be perfect video source for testing when one don't have lots
of capture boards and cameras. Only its framerate was hardcoded to
NTSC's 30fps, while in my country we usually use PAL (25 fps) and I
needed that to precisely simulate bandwidth.
That's why here is this patch with ->enum_frameintervals() and
->{g,s}_parm() implemented as suggested by Hans Verkuil which passes
v4l2-compliance and manual testing through v4l2-ctl -P / -p <fps>.

Regarding newly introduced __get_format(u32 pixelformat) I decided not
to convert original get_format() to operate on fourcc codes, since >= 3
places in driver need to deal with v4l2_format and otherwise it won't be
handy.

[mchehab@redhat.com: Some CodingStyle fixes]

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] staging/media/solo6x10/v4l2-enc.c: fix error-handling
Cyril Roelandt [Fri, 16 Nov 2012 21:17:01 +0000 (18:17 -0300)]
[media] staging/media/solo6x10/v4l2-enc.c: fix error-handling

The return values of copy_to_user() and copy_from_user() cannot be negative.
Found using the following semantich patch:
<spml>
@exists@
identifier ret;
statement S;
expression E;
@@
(
* ret = copy_to_user(...);
|
* ret = copy_from_user(...);
)
... when != ret = E
    when != if (ret) { <+... ret = E; ...+> }
* if (ret < 0)
  S
</spml>

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] s5p-tv: Use devm_gpio_request in sii9234_drv.c
Sachin Kamat [Fri, 16 Nov 2012 03:55:28 +0000 (00:55 -0300)]
[media] s5p-tv: Use devm_gpio_request in sii9234_drv.c

devm_gpio_request is a device managed function and will make
error handling and cleanup a bit simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] it913x: fix correct endpoint size when pid filter on
Malcolm Priestley [Thu, 8 Nov 2012 20:30:21 +0000 (17:30 -0300)]
[media] it913x: fix correct endpoint size when pid filter on

I kept the count as the hardware default with dvb-usb-v2, with 5, users
can still run in to trouble with Video PIDs.
I have traced it to an incorrect endpoint size when the PID filter
is enabled. It also affected USB 2.0 with the filter on.

Reported-by: Antti Palosaari <crope@iki.fi>
Tested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] cx23885: add RC support for MyGica X8507
Alfredo Jesús Delaiti [Thu, 8 Nov 2012 18:50:25 +0000 (15:50 -0300)]
[media] cx23885: add RC support for MyGica X8507

This series add remote control support for MyGica X8507.
I test for 2 month under OpenSuse(X64) 11.4 and 12.2 with
kernel 3.4, 3.5, 3.6 also 3.7-rc2 and rc3.

[mchehab@redhat.com: fixed whitespacing - it seems that Alfredo's emailer mangled
 it]

Signed-off-by: Alfredo J. Delaiti <alfredodelaiti@netscape.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] rc/keymaps: add RC keytable for MyGica X8507
Alfredo Jesús Delaiti [Thu, 8 Nov 2012 19:14:50 +0000 (16:14 -0300)]
[media] rc/keymaps: add RC keytable for MyGica X8507

Add RC-5 remote keytable definition for MyGica X8507.

[mchehab@redhat.com: fixed whitespacing - it seems that Alfredo's emailer mangled
 it]
Signed-off-by: Alfredo J. Delaiti <alfredodelaiti@netscape.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: prefer bulk mode on webcams
Mauro Carvalho Chehab [Sun, 23 Dec 2012 15:25:38 +0000 (13:25 -0200)]
[media] em28xx: prefer bulk mode on webcams

Using bulk mode allows more than one webcam, as the maximum fps
is low at 640x480 resolution. So, prefer it, if the device is
a webcam.

Tested with Silvercrest 1.3 Mpixel webcam (em2710) on both bulk and isoc
modes.

Tested analog with HVR-950 model 65201/A1C0 (em2883), where only ISOC
endpoints are available for both DVB and Analog.

Tested on Hauppauge WinTV USB 2 (em2840) on both bulk and isoc modes.

It should be noticed that enabling bulk mode by default with TV boards
is a bad idea; what happens is that, while with ISOC the USB logic will
prevent the concurrent usage of two devices that spends more than 100%
of the USB2 traffic, it doesn't care with bulk transfers.

On my tests, I started two streams, one with a WinTV at 640x480x30fps
and the other one with a Silvercrest webcam at 640x480, on a lower fps)
both on bulk mode. One of the streams always silently failed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: make the logs reflect the specific chip name
Mauro Carvalho Chehab [Sun, 23 Dec 2012 18:32:03 +0000 (16:32 -0200)]
[media] em28xx: make the logs reflect the specific chip name

In order to make easier to analize the logs when multiple devices
are plugged, change the device name accordingly with the chip
version.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: display the isoc/bulk mode
Mauro Carvalho Chehab [Sun, 23 Dec 2012 15:15:47 +0000 (13:15 -0200)]
[media] em28xx: display the isoc/bulk mode

As both bulk and isoc modes can be available, display what it
was found for both DVB and analog.

While here, also displays if audio is provided via USB Audio
Class or via vendor's extension.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: prefer_bulk parameter is read-only
Mauro Carvalho Chehab [Sun, 23 Dec 2012 15:14:20 +0000 (13:14 -0200)]
[media] em28xx: prefer_bulk parameter is read-only

As the bulk mode is set at device's probe, it is not possible
to change it later. So, change the parameter to be read only
after modprobing.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years ago[media] em28xx: clean up the data type mess of the i2c transfer function parameters
Frank Schaefer [Sun, 16 Dec 2012 17:23:27 +0000 (14:23 -0300)]
[media] em28xx: clean up the data type mess of the i2c transfer function parameters

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>