summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-08-02V4L/DVB: videobuf: Remove the videobuf_sg_dma_map/unmap functionsLaurent Pinchart
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>
2010-08-02V4L/DVB: videobuf: rename videobuf_mmap_free and add sanity checksPawel Osciak
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>
2010-08-02V4L/DVB: videobuf: rename videobuf_alloc to videobuf_alloc_vbPawel Osciak
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>
2010-08-02V4L/DVB: drivers/media: Use memdup_userJulia Lawall
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>
2010-08-02V4L/DVB: cx25821: Fix bad whitespacingMauro Carvalho Chehab
Should use tabs for identation, and not whitespace Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: cx25821: Add a kernel level at printk'sMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: cx25821: Make comments C99 compliantMauro Carvalho Chehab
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>
2010-08-02V4L/DVB: cx25821: Removed duplicate code and cleaned upPalash Bandyopadhyay
Signed-off-by: Palash Bandyopadhyay <Palash.Bandyopadhyay@conexant.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: DocBook/media: Add LIRC DocBook to media.htmlMauro Carvalho Chehab
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>
2010-08-02V4L/DVB: IR/lirc: add docbook info covering lirc device interfaceJarod Wilson
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>
2010-08-02V4L/DVB: IR: add empty lirc pseudo-keymapJarod Wilson
Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: IR TX: incoming IR buffer now an int pointerJarod Wilson
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>
2010-08-02V4L/DVB: IR: add ir-core to lirc userspace decoder bridge driverJarod Wilson
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>
2010-08-02V4L/DVB: IR: add lirc device interfaceJarod Wilson
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>
2010-08-02V4L/DVB: drivers/media/video/zoran: Use kmemdupJulia Lawall
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>
2010-08-02V4L/DVB: dvb-usb-init.c: white space changes in dvb-usb-initDan Carpenter
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>
2010-08-02V4L/DVB: drivers/media/video/tlg2300: Use kmemdupJulia Lawall
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>
2010-08-02V4L/DVB: Increment DVB API versionMauro Carvalho Chehab
A new flag were added at the Frontend capabilities. Increment API minor revision. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: DocBook/dvb: Update spec to reflect the current FE capabilitiesMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: Add FE_CAN_TURBO_FECKlaus Schmidinger
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>
2010-08-02V4L/DVB: drivers/media/video/uvc: Use kmemdupJulia Lawall
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>
2010-08-02V4L/DVB: drivers/media/video/gspca: Use kmemdupJulia Lawall
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>
2010-08-02V4L/DVB: drivers/media/dvb/dvb-usb/dib0700: CodingStyle fixesDaniel Mack
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>
2010-08-02V4L/DVB: drivers/media/dvb/dvb-usb/dib0700: fix return valuesDaniel Mack
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>
2010-08-02V4L/DVB: drivers/media/video/pvrusb2: Add missing mutex_unlockJulia Lawall
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>
2010-08-02V4L/DVB: vivi: fix depends againRandy Dunlap
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>
2010-08-02V4L/DVB: smscoreapi/w9968cf: drivers/media: Remove unnecesary kmalloc castsJoe Perches
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>
2010-08-02V4L/DVB: IR/mceusb: add tx callback functions and wire upJarod Wilson
mchehab: merged with IR/mceusb: userspace buffer copy moved out of driver Userspace buffer copy moved out of driver and into lirc bridge driver [mchehab@redhat.com: merged the patch to avoid compilation errors with allyesconfig ] Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: IR: add tx callbacks to ir-coreJarod Wilson
Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: IR/mceusb: kill pinnacle-device-specific nonsenseJarod Wilson
I have pinnacle hardware now. None of this pinnacle-specific crap is at all necessary (in fact, some of it needed to be removed to actually make it work). The only thing unique about this device is that it often transfers inbound data w/a header of 0x90, meaning 16 bytes of IR data following it, so I had to make adjustments for that, and now its working perfectly fine. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: IR/mceusb: misc cleanups and init fixesJarod Wilson
The first-gen mceusb device init code, while mostly functional, had a few issues in it. This patch does the following: 1) removes use of magic numbers 2) eliminates mapping of memory from stack 3) makes debug spew translator functional Additionally, this clean-up revealed that we cannot read the proper default tx blaster bitmask from the device, we do actually have to initialize it ourselves, which requires use of a somewhat gross list-based mask inversion check. This patch also removes the entirely unnecessary use of struct ir_input_state. Also supersedes two earlier patches that also touched on first-gen cleanup, but were partially botched. This one actually compiles, works, etc., I swear. ;) Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: IR/mceusb: use the proper ir-core device unregister functionJarod Wilson
Was using input_unregister_device directly, instead of using ir_input_unregister, which tears down a bunch of other things in addition to eventually calling input_unregister_device. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: IR/imon: use the proper ir-core device unregister functionJarod Wilson
Was using input_unregister_device directly, instead of using ir_input_unregister, which tears down a bunch of other things in addition to eventually calling input_unregister_device. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: media/IR: nec-decoder needs to select BITREVRandy Dunlap
Fix ir-nec-decoder build: it uses bitrev library code, so select BITREVERSE in its Kconfig. ir-nec-decoder.c:(.text+0x1a2517): undefined reference to `byte_rev_table' ir-nec-decoder.c:(.text+0x1a2526): undefined reference to `byte_rev_table' ir-nec-decoder.c:(.text+0x1a2530): undefined reference to `byte_rev_table' ir-nec-decoder.c:(.text+0x1a2539): undefined reference to `byte_rev_table' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: move decoding state to ir_raw_event_ctrlDavid Härdeman
This patch moves the state from each raw decoder into the ir_raw_event_ctrl struct. This allows the removal of code like this: spin_lock(&decoder_lock); list_for_each_entry(data, &decoder_list, list) { if (data->ir_dev == ir_dev) break; } spin_unlock(&decoder_lock); return data; which is currently run for each decoder on each event in order to get the client-specific decoding state data. In addition, ir decoding modules and ir driver module load order is now independent. Centralizing the data also allows for a nice code reduction of about 30% per raw decoder as client lists and client registration callbacks are no longer necessary (but still kept around for the benefit of the lirc decoder). Out-of-tree modules can still use a similar trick to what the raw decoders did before this patch until they are merged. Signed-off-by: David Härdeman <david@hardeman.nu> Acked-by: Jarod Wilson <jarod@redhat.com> Tested-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: allow specifying multiple protocols at one open/writeMauro Carvalho Chehab
With this change, it is now possible to do something like: su -c 'echo "none +rc-5 +nec" > /sys/class/rc/rc1/protocols' This prevents the need of multiple opens, one for each protocol change, and makes userspace application easier. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: Add support for disabling all protocolsMauro Carvalho Chehab
Writing "none" to /dev/class/rc/rc*/protocols will disable all protocols. This allows an easier setup, from userspace, as userspace applications don't need to disable protocol per protocol, before enabling a different set of protocols. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: Rename sysfs protocols nomenclature to rc-5 and rc-6Mauro Carvalho Chehab
While rc-5 and rc-6 protocols are generally abreviated as "rc5" and "rc6", previous sysfs nodes uses rc-5 and rc-6 for the Philips protocols. This is consistent with the protocol nomenclature given by the original Philips spec: "Remote control system RC-5" (doc. Nr. 9398 706 23011). Also, rc5 is the name of a widely known cryptography protocol. So, the better is to keep referring to those protocols as "rc-5" and "rc-6". Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: Remove magic numbers at the sysfs logicMauro Carvalho Chehab
Instead of using "magic" sizes for protocol names, replace them by an array, and use strlen(). No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: centralize sysfs raw decoder enabling/disablingDavid Härdeman
With the current logic, each raw decoder needs to add a copy of the exact same sysfs code. This is both unnecessary and also means that (re)loading an IR driver after raw decoder modules have been loaded won't work as expected. This patch moves that logic into ir-raw-event and adds a single sysfs file per device. Reading that file returns something like: "rc5 [rc6] nec jvc [sony]" (with enabled protocols in [] brackets) Writing either "+protocol" or "-protocol" to that file will enable or disable the according protocol decoder. An additional benefit is that the disabling of a decoder will be remembered across module removal/insertion so a previously disabled decoder won't suddenly be activated again. The default setting is to enable all decoders. This is also necessary for the next patch which moves even more decoder state into the central raw decoding structs. Signed-off-by: David Härdeman <david@hardeman.nu> Acked-by: Jarod Wilson <jarod@redhat.com> Tested-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: partially convert ir-kbd-i2c.c to not use ir-functions.cDavid Härdeman
Partially convert drivers/media/video/ir-kbd-i2c.c to not use ir-functions.c Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: partially convert cx88 to not use ir-functions.cDavid Härdeman
Partially convert drivers/media/video/cx88/cx88-input.c to not use ir-functions.c Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: em28xx-input: Don't generate one debug message for every get_key readMauro Carvalho Chehab
Instead of generating one printk for every IR read, prints it only when count is different from the last count. While here, as this code is called on every 100ms during the runtime lifetime, do some performance optimization, assuming that, under normal circumstances, it is unlikely that the driver would get a new key/key repeat on every poll. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: convert em28xx to not use ir-functions.cDavid Härdeman
Convert drivers/media/video/em28xx/em28xx-input.c to not use ir-functions.c Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: ir-core: convert mantis to not use ir-functions.cDavid Härdeman
Convert drivers/media/dvb/mantis/mantis_input.c to not use ir-functions.c Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: Fix kernel Oops when number of NetUP Dual DVB-S2-CI cards more than ↵Abylay Ospan
DVB_MAX_ADAPTERS limit Signed-off-by: Abylay Ospan <aospan@netup.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: gspca - main: Remove V4L1 compatibilityJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: gspca - main: Don't use the PG_Reserved flag for mmapped buffersJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: gspca - sq930x: New sensor mt9v111Jean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02V4L/DVB: gspca - sq930x: Check the USB read errorsJean-François Moine
Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>