Commit Graph

11113 Commits

Author SHA1 Message Date
Stephen Rothwell 30f5b28e7f [media] rc: update for bitop name changes
Fix the following compile failure:

  drivers/media/rc/ite-cir.c: In function 'ite_decode_bytes':
  drivers/media/rc/ite-cir.c:190: error: implicit declaration of function 'generic_find_next_le_bit'
  drivers/media/rc/ite-cir.c:199: error: implicit declaration of function 'generic_find_next_zero_le_bit'

Caused by commit 620a32bba4 ("[media] rc: New rc-based ite-cir driver
for several ITE CIRs") interacting with commit c4945b9ed4
("asm-generic: rename generic little-endian bitops functions").

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-03-24 18:58:55 -07:00
Linus Torvalds 76d21c5635 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (442 commits)
  [media] videobuf2-dma-contig: make cookie() return a pointer to dma_addr_t
  [media] sh_mobile_ceu_camera: Do not call vb2's mem_ops directly
  [media] V4L: soc-camera: explicitly require V4L2_BUF_TYPE_VIDEO_CAPTURE
  [media] v4l: soc-camera: Store negotiated buffer settings
  [media] rc: interim support for 32-bit NEC-ish scancodes
  [media] mceusb: topseed 0x0011 needs gen3 init for tx to work
  [media] lirc_zilog: error out if buffer read bytes != chunk size
  [media] lirc: silence some compile warnings
  [media] hdpvr: use same polling interval as other OS
  [media] ir-kbd-i2c: pass device code w/key in hauppauge case
  [media] rc/keymaps: Remove the obsolete rc-rc5-tv keymap
  [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map
  [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge
  [media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping
  [media] rc-rc5-hauppauge-new: Add support for the old Black RC
  [media] rc-rc5-hauppauge-new: Add the old control to the table
  [media] rc-winfast: Fix the keycode tables
  [media] a800: Fix a few wrong IR key assignments
  [media] opera1: Use multimedia keys instead of an app-specific mapping
  [media] dw2102: Use multimedia keys instead of an app-specific mapping
  ...

Fix up trivial conflicts (remove/modify and some real conflicts) in:
	arch/arm/mach-omap2/devices.c
	drivers/staging/Kconfig
	drivers/staging/Makefile
	drivers/staging/dabusb/dabusb.c
	drivers/staging/dabusb/dabusb.h
	drivers/staging/easycap/easycap_ioctl.c
	drivers/staging/usbvideo/usbvideo.c
	drivers/staging/usbvideo/vicam.c
2011-03-24 09:50:13 -07:00
Andres Salomon 15de7a41d3 mfd: mfd_cell is now implicitly available to wl1273 drivers
The cell's platform_data is now accessed with a helper function;
change clients to use that, and remove the now-unused data_size.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23 10:41:53 +01:00
Andres Salomon e46dccff34 mfd: mfd_cell is now implicitly available to timberdale drivers
The cell's platform_data is now accessed with a helper function;
change clients to use that, and remove the now-unused data_size.

Note that the mfd's platform_data is marked __devinitdata.  This
is still correct in all cases except for the timbgpio driver, whose
remove hook has been changed to no longer reference the pdata.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2011-03-23 10:41:52 +01:00
Pawel Osciak 472af2b05b [media] videobuf2-dma-contig: make cookie() return a pointer to dma_addr_t
dma_addr_t may not fit into void* on some architectures. To be safe, make
vb2_dma_contig_cookie() return a pointer to dma_addr_t and dereference it
in vb2_dma_contig_plane_paddr() back to dma_addr_t.

Signed-off-by: Pawel Osciak <pawel@osciak.com>
Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:41:58 -03:00
Pawel Osciak d6db5bfe7f [media] sh_mobile_ceu_camera: Do not call vb2's mem_ops directly
Use vb2_dma_contig_plane_paddr to retrieve a physical address for a plane
instead of calling an internal mem_ops callback.

Signed-off-by: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:41:57 -03:00
Guennadi Liakhovetski d366d4a08a [media] V4L: soc-camera: explicitly require V4L2_BUF_TYPE_VIDEO_CAPTURE
The soc-camera core accesses the "pix" member of the struct v4l2_format::fmt
union, which is only valid for V4L2_BUF_TYPE_VIDEO_CAPTURE streams. This
patch adds explicit checks for this to {g,s,try}_fmt methods.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:41:56 -03:00
Sergio Aguirre 0e4c180d3e [media] v4l: soc-camera: Store negotiated buffer settings
This fixes the problem in which a host driver
sets a personalized sizeimage or bytesperline field,
and gets ignored when doing G_FMT.

Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:41:55 -03:00
Jarod Wilson 4be22b6a7f [media] rc: interim support for 32-bit NEC-ish scancodes
The Apple and TiVo remotes I've got use an NEC-ish protocol, but rather
than a command/not_command pair, they have what appear to be vendor ID
bytes. This change makes the NEC decoder warn if the command/not_command
checksum fails, but then passes along a full 32-bit scancode for keymap
lookup. This change should make no difference for existing keymaps,
since they simply won't have 32-bit scancodes, but allows for a 32-bit
keymap. At the moment, that'll have to be uploaded by the user, but I've
got Apple and TiVo remote keymaps forthcoming.

In the long run (2.6.40, hopefully), we should probably just always use
all 32 bits for all NEC keymaps, but this should get us by for 2.6.39.

(Note that a few of the TiVo keys actuallly *do* pass the command
checksum, so for now, the keymap for this remote will have to be a mix
of 24-bit and 32-bit scancodes, but so be it).

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:24:23 -03:00
Jarod Wilson 7d9a46f9d5 [media] mceusb: topseed 0x0011 needs gen3 init for tx to work
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:24:22 -03:00
Jarod Wilson dc8e2aa3b5 [media] hdpvr: use same polling interval as other OS
The hdpvr's IR part, in short, sucks. As observed with a usb traffic
sniffer, the Windows software for it uses a polling interval of 405ms.
Its still not behaving as well as I'd like even with this change, but
this inches us closer and closer to that point...

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:24:19 -03:00
Jarod Wilson 6e5b960176 [media] ir-kbd-i2c: pass device code w/key in hauppauge case
The new hauppauge key tables use both device code button code.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:24:18 -03:00
Mauro Carvalho Chehab 206241069e [media] rc/keymaps: Remove the obsolete rc-rc5-tv keymap
This keymap were used for the Hauppauge Black remote controller
only. It also contains some keycodes not found there. As the
Hauppauge Black is now part of the hauppauge keymap, just remove
it.

Also, remove the modprobe hacks to select between the Gray
and the Black versions of the remote controller as:
 - Both are supported by default by the keymap;
 - If the user just wants one keyboard supported,
   it is just a matter of changing the keymap via
   the userspace tool (ir-keytable), removing
   the keys that he doesn't desire. As ir-keytable
   auto-loads the keys via udev, this is better than
   obscure modprobe parameters.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:17 -03:00
Mauro Carvalho Chehab af86ce79f0 [media] remove the old RC_MAP_HAUPPAUGE_NEW RC map
The rc-hauppauge-new map is a messy thing, as it bundles 3

different remote controllers as if they were just one,
discarding the address byte. Also, some key maps are wrong.

With the conversion to the new rc-core, it is likely that
most of the devices won't be working properly, as the i2c
driver and the raw decoders are now providing 16 bits for
the remote, instead of just 8.

 delete mode 100644 drivers/media/rc/keymaps/rc-hauppauge-new.c

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:16 -03:00
Mauro Carvalho Chehab 15195d3a83 [media] rc/keymaps: Rename Hauppauge table as rc-hauppauge
There are two "hauppauge-new" keymaps, one with protocol
unknown, and the other with the protocol marked accordingly.
However, both tables are miss-named.

Also, the old rc-hauppauge-new is broken, as it mixes
three different controllers as if they were just one.

This patch solves half of the problem by renaming the
correct keycode table as just rc-hauppauge. This table
contains the codes for the four different types of
remote controllers found on Hauppauge cards, properly
mapped with their different addresses.

 create mode 100644 drivers/media/rc/keymaps/rc-hauppauge.c
 delete mode 100644 drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
[Jarod: fix up RC_MAP_HAUPPAUGE defines]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:14 -03:00
Mauro Carvalho Chehab 0548757419 [media] rc-rc5-hauppauge-new: Fix Hauppauge Grey mapping
The keys for the old black were messed with the ones for the
hauppauge grey. Fix it.

Also, fixes some keycodes and order the keys according with
the way they appear inside the remote controller.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:13 -03:00
Mauro Carvalho Chehab 9890a9edc8 [media] rc-rc5-hauppauge-new: Add support for the old Black RC
Hans borrowed me an old Black Hauppauge RC. Thanks to that, we
can fix the RC5 table for Hauppauge.

Thanks-to: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:12 -03:00
Mauro Carvalho Chehab 0684f5b0fc [media] rc-rc5-hauppauge-new: Add the old control to the table
Adds the old grey remote controller to Hauppauge table.

Hans borrowed me an old gray Hauppauge RC. Thanks to that, we
can fix the RC5 table for Hauppauge.

Thanks-to: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:11 -03:00
Mauro Carvalho Chehab 7f961c6989 [media] rc-winfast: Fix the keycode tables
One of the remotes has a picture available at:
	http://lirc.sourceforge.net/remotes/leadtek/Y04G0004.jpg

As there's one variant with a set direction keys plus vol/chann
keys, and the same table is used for both models, change it to
represent all keys, avoiding the usage of weird function keys.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:10 -03:00
Mauro Carvalho Chehab 898a83e924 [media] a800: Fix a few wrong IR key assignments
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:09 -03:00
Mauro Carvalho Chehab 76fd93b623 [media] opera1: Use multimedia keys instead of an app-specific mapping
This driver uses an app-specific keymap for one of the tables. This
is wrong. Instead, use the standard keycodes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:08 -03:00
Mauro Carvalho Chehab 991bd3c25e [media] dw2102: Use multimedia keys instead of an app-specific mapping
This driver uses an app-specific keymap for one of the tables. This
is wrong. Instead, use the standard keycodes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:07 -03:00
Mauro Carvalho Chehab 04efa85e03 [media] rc/keymaps: Use KEY_LEFTMETA were pertinent
Using xev and testing the "Windows" key on a normal keyboard, it
is mapped as KEY_LEFTMETA. So, as this is the standard code for
it, use it, instead of a generic, meaningless KEY_PROG1.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:06 -03:00
Mauro Carvalho Chehab d9e9f41c45 [media] rc/keymaps: Fix most KEY_PROG[n] keycodes
Those KEY_PROG[n] keys were used on places where the developer
didn't know for sure what key should be used. On several cases,
using KEY_RED, KEY_GREEN, KEY_YELLOW would be enough. On others,
there are specific keys for that already.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:05 -03:00
Mauro Carvalho Chehab 6f9e46b447 [media] rc/keymaps: Use KEY_VIDEO for Video Source
Each keyboard map were using a different definition for
the Source/Video Source key.
Behold Columbus were the only one using KEY_PROPS.

As we want to standardize those keys at X11 and at
userspace applications, we need to use just one code
for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:04 -03:00
Mauro Carvalho Chehab 444cc20b3d [media] rc/keymaps: use KEY_CAMERA for snapshots
On a few places, KEY_MHP were used for snapshots. However, KEY_CAMERA
is used for it on all the other keyboards that have a snapshot/Picture
button.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
2011-03-22 19:24:03 -03:00
Jarod Wilson b443ac5a28 [media] hdpvr: i2c master enhancements
Make the hdpvr's i2c master implementation more closely mirror that of
the pvrusb2 driver. Currently makes no significant difference in IR
reception behavior with ir-kbd-i2c (i.e., it still sucks).

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:23:48 -03:00
Jarod Wilson 53a5fd4ded [media] imon: add more panel scancode mappings
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 19:23:47 -03:00
Mauro Carvalho Chehab 2ccb24ff3b [media] ite-cir: Fix some CodingStyle issues
Cc: Juan J. Garcia de Soria <skandalfo@gmail.com>
Cc: Stephan Raue <stephan@openelec.tv>
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 17:20:12 -03:00
Juan J. Garcia de Soria 620a32bba4 [media] rc: New rc-based ite-cir driver for several ITE CIRs
This is a second version of an rc-core based driver for the ITE Tech IT8712F
CIR and now for a pair of other variants of the IT8512 CIR too.

This driver should replace the lirc_it87 and lirc_ite8709 currently living in
the LIRC staging directory.

The driver should support the ITE8704, ITE8713, ITE8708 and ITE8709 (this last
one yet untested) PNP ID's.

The code doesn'te reuse code from the pre-existing LIRC drivers, but has been
written from scratch using the nuvoton.cir driver as a skeleton.

This new driver shouldn't exhibit timing problems when running under load (or
with interrupts disabled for relatively long times). It works OOTB with the
RC6 MCE remote bundled with the ASUS EEEBox. TX support is implemented, but
I'm unable to test it since my hardware lacks TX capability.

Signed-off-by: Juan J. Garcia de Soria <skandalfo@gmail.com>
Tested-by: Stephan Raue <stephan@openelec.tv>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:31 -03:00
Mauro Carvalho Chehab baf075eca4 [media] drivers/media/rc/Kconfig: use tabs, instead of spaces
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:30 -03:00
Steven Rostedt 3e507c5591 [media] saa7134: Fix strange kconfig dependency on RC_CORE
As the code in saa7134-input is not a module, but the config for it is
set as a boolean instead of a tristate, this causes a strange dependency
on RC_CORE.

VIDEO_SAA7134_RC (which determines if saa7134-input.o is built) depends
on RC_CORE and VIDEO_SAA7134. If VIDEO_SAA7134 is compiled as 'y' but
RC_CORE is compiled as 'm' VIDEO_SAA7134_RC can still be set to 'y'
which causes undefined symbols that it needs from RC_CORE.

The simplest solution is to not allow VIDEO_SAA7134_RC be enabled if
RC_CORE compiled as a module (m) and VIDEO_SA7134 is compiled into the
kernel (y).

Suggested-by: Mauro Carvalho Chehab <mchehab@redhat.com>

Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild <linux-kbuild@vger.kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:29 -03:00
Malcolm Priestley b50b3a1acd [media] STV0288 added full frontend status
status now returns
 FE_HAS_CARRIER
 FE_HAS_SIGNAL
 FE_HAS_VITERBI

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:28 -03:00
Jean-François Moine 590f216806 [media] gspca - zc3xx: Add exposure control for sensor hv7131r
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:27 -03:00
Patrice Chotard 7106225a9e [media] gspca - main: Add endpoint direction test in alt_xfer
This patch fixes a bug in gspca, more precisely in alt_xfer().

This function looks for an input transfer endpoint in an alternate setting.
By default it returns the first endpoint corresponding to the transfer type
indicated in parameter.
But with some USB devices, the first endpoint corresponding to the transfer
type is not always an INPUT endpoint but an OUTPUT one.

This patch adds the endpoint direction test to be sure to return an INPUT endpoint

Signed-off-by: Patrice CHOTARD <patricechotard@free.fr>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:26 -03:00
Jean-François Moine 8e3c08bb41 [media] gspca - nw80x: Fix exposure for some webcams
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:25 -03:00
Jean-François Moine 088fc390bd [media] gspca - nw80x: Get the sensor ID when bridge et31x110
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:24 -03:00
Jean-François Moine 152507144a [media] gspca - nw80x: Fix some image resolutions
No 352x288 for Ds3303 and no 320x240 for Generic802.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:22 -03:00
Jean-François Moine ee32ffbf8e [media] gspca - nw80x: Check the bridge from the webcam type
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:22 -03:00
Jean-François Moine f12b44ff2d [media] gspca - nw80x: Fix the gain, exposure and autogain
The autogain now uses common functions.

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:20 -03:00
Jean-François Moine bad03ff53a [media] gspca - nw80x: Do some initialization at probe time
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:19 -03:00
Jean-François Moine 94751d4b20 [media] gspca - nw80x: The webcam dsb-c110 is the same as the twinkle
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:18 -03:00
Jean-François Moine c3ee142b44 [media] gspca - nw80x: Cleanup source
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:17 -03:00
Hans Verkuil b1a873a37b [media] v4l2: use new flag to enable core priority handling
Rather than guess which driver supports core priority handling, require drivers
that do to explicitly set the V4L2_FL_USE_FH_PRIO flag in video_device.

Updated the core prio handling accordingly and set the flag in the three
drivers that do.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:16 -03:00
Hans Verkuil 2f82441a86 [media] ivtv: replace ugly casts with a proper container_of
ivtv-ioctl cast the 'void *fh' directly to 'ivtv_open_id *'. This should be
done properly with a contained_of since the 'void *fh' is really a
'struct v4l2_fh *'.

It worked because the v4l2_fh field is also the first field in the ivtv_open_id
struct, but it is not clean code.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:12 -03:00
Hans Verkuil 6aff72f6d5 [media] ivtv: add missing v4l2_fh_exit
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:11 -03:00
Hans Verkuil 2e4784d0d3 [media] vivi: convert to core priority handling
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:10 -03:00
Hans Verkuil 1309929497 [media] dsbr100: ensure correct disconnect sequence
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:09 -03:00
Hans Verkuil e64d07c92d [media] dsbr100: convert to unlocked_ioctl
Use core-assisted locking so .ioctl can be replaced by .unlocked_ioctl.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:07 -03:00
Hans Verkuil bedf8bcf6b [media] v4l2-device: add kref and a release function
The video_device struct has proper ref counting and its release function
will be called when the last user releases it. But no such support was
available for struct v4l2_device. This made it hard to determine when a
USB driver can release the device if it has multiple device nodes.

With one device node it is easy of course, since when the device node is
released, the whole device can be released.

This patch adds refcounting to v4l2_device. When registering device nodes
the v4l2_device refcount will be increased, when releasing device nodes
it will be decreased. The (optional) release function will be called when
the last device node was released.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2011-03-22 16:38:05 -03:00