aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-09-03[media] lirc_dev: fix sparse warningsHans Verkuil1-7/+7
drivers/media/rc/lirc_dev.c:598:26: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/lirc_dev.c:606:26: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/lirc_dev.c:616:26: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/lirc_dev.c:625:26: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/lirc_dev.c:634:26: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/lirc_dev.c:643:26: warning: incorrect type in argument 1 (different address spaces) drivers/media/rc/lirc_dev.c:739:45: warning: cast removes address space of expression drivers/media/rc/lirc_dev.c:739:58: warning: incorrect type in argument 1 (different address spaces) Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] imon: fix sparse warningsHans Verkuil1-4/+4
drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32 drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32 drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32 drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32 drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32 drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32 drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32 drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32 drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32 drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32 drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32 drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64 drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32 drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32 drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32 drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32 drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32 drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32 Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] img-ir: fix sparse warningsHans Verkuil2-6/+6
drivers/media/rc/img-ir/img-ir-nec.c:111:23: warning: symbol 'img_ir_nec' was not declared. Should it be static? drivers/media/rc/img-ir/img-ir-jvc.c:54:23: warning: symbol 'img_ir_jvc' was not declared. Should it be static? drivers/media/rc/img-ir/img-ir-sony.c:120:23: warning: symbol 'img_ir_sony' was not declared. Should it be static? drivers/media/rc/img-ir/img-ir-sharp.c:75:23: warning: symbol 'img_ir_sharp' was not declared. Should it be static? drivers/media/rc/img-ir/img-ir-sanyo.c:82:23: warning: symbol 'img_ir_sanyo' was not declared. Should it be static? Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-26[media] enable COMPILE_TEST for media driversMauro Carvalho Chehab1-2/+3
There are several arch-specific media drivers that don't require asm-specific includes and can be successfully compiled on x86. Add COMPILE_TEST dependency for them, in order to allow a broader test on those drivers. That helps static analysis tools like Coverity to discover eventual troubles there. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21[media] imon: Fix not working front panelUlrich Eckhardt1-0/+1
Make the front panel buttons working after another button on the remote was pressed. Signed-off-by: Ulrich Eckhardt <uli@uli-eckhardt.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21[media] imon: Add internal key table for 15c2:0034Ulrich Eckhardt1-1/+22
Add the key table for the Thermaltake DH-102 to the USB-Id 15c2:0034. Signed-off-by: Ulrich Eckhardt <uli@uli-eckhardt.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21[media] imon: Define keytables per USB Device IdUlrich Eckhardt1-93/+173
This patch defines the keytables per USB Device ID. Signed-off-by: Ulrich Eckhardt <uli@uli-eckhardt.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30[media] ir-rc5-decoder: print where decoding failsMauro Carvalho Chehab1-2/+2
The IR dprintk message that prints a RC5 decoding failure is not much helpful, as it doesn't tell on what bit the error occurred. Add such information, in order to make the debug message more useful. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-30[media] rc-main: allow raw protocol drivers to restrict the allowed protosMauro Carvalho Chehab1-3/+2
On some hardware (au0828/au8522), the hardware is broken with regards to the initial pulse detection. So, the driver needs to produce a fake start pulse. That limits the acceptable protocols, as it is not possible to produce a fake pulse that would cover all supported protocols. So, allow the driver to explicitly set the allowed protocols. If the driver doesn't specify, keep the old behavior. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-27[media] mceusb: select default keytable based on vendorMauro Carvalho Chehab1-6/+17
Some vendors have their on keymap table that are used on all (or almost all) models for that vendor. So, instead of specifying the keymap table per USB ID, let's use the Vendor ID's table by default. At the end, this will mean less code to be added when newer devices for those vendors are added. Of course, if rc_map is specified per board, it takes precedence. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-27[media] mceusb: add support for newer cx231xx devicesMauro Carvalho Chehab1-0/+8
Add support for the si2165-based cx231xx devices: [2013:025e] PCTV QuatroStick 522e [2013:0259] PCTV QuatroStick 521e [2040:b131] Hauppauge WinTV 930C-HD (model 1114xx) They're similar to the already supported: [2040:b130] Hauppauge WinTV 930C-HD (model 1113xx) Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-26[media] rc: Add support for decoding XMP protocolMarcel J.E. Mol6-0/+250
This protocol is found on Dreambox remotes [m.chehab@samsung.com: CodingStyle fixes and conflict fix] Signed-off-by: Marcel Mol <marcel@mesa.nl> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] ati_remote: Better default keycodesGeorge Spelvin1-10/+20
This tries to make them more like other remotes, and/or the button labels. Notably, the (>>) button is made KEY_FASTFORWARD, which is the correct opposite of (<<)'s KEY_REVERSE. (It was KEY_FORWARD, something else entirely.) Likewise, KEY_STOP is the Sun keyboard "interrupt program" key; the media key is KEY_STOPCD. A restriction is that I try to avoid keycodes above 255, as the X11 client/server protocol is limited to 8-bit key codes. If not for this, I would have used the KEY_NUMERIC_x codes for the numbers. Signed-off-by: George Spelvin <linux@horizon.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] ati_remote: Add comments to keycode tableGeorge Spelvin1-10/+23
A more detailed description of what the buttons look like and their intended function makes it easier for people to maintain this code without access to the hardware. [m.chehab@samsung.com: Fixed a typo "Mdeia" instead of "Media"] Signed-off-by: George Spelvin <linux@horizon.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] ati_remote: Sort buttons in top-to-bottom orderGeorge Spelvin1-23/+34
Since numerical order corresponds to top-left-to-bottom-right order on the remote, this makes the table easier to read. Signed-off-by: George Spelvin <linux@horizon.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] ati_remote: Use non-alomic __set_bitGeorge Spelvin1-1/+1
There's no reason to use a LOCK prefix here. Signed-off-by: George Spelvin <linux@horizon.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] ati_remote: Merge some duplicate codeGeorge Spelvin1-11/+10
The KIND_FILTERED assignment of old_jiffies can't be merged, because it must precede repeat handling. Signed-off-by: George Spelvin <linux@horizon.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] ati_remote: Shrink the ati_remote_tbl even moreGeorge Spelvin1-34/+35
Get rid of the unnecessary "type" and "value" fields. Signed-off-by: George Spelvin <linux@horizon.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] ati_remote: Generalize KIND_ACCEL to accept diagonalsGeorge Spelvin1-48/+23
Rather than having special code cases for diagonal mouse movements, extend the general purpose code used for the cardinal directions to handle arbitrary (x,y) deltas. The deltas themselves are stored in translation table's "code" field; this is also progress toward the goal of eliminating the "value" element entirely. Signed-off-by: George Spelvin <linux@horizon.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] ati_remote: Delete superfluous input_sync()George Spelvin1-1/+0
It's not necessary, and since both events happen "at the same time" in response to a single input event, the input device framework prefers not to have it there. (It's not a big deal one way or the other, but deleting cruft is generally a good thing.) Signed-off-by: George Spelvin <linux@horizon.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] ati_remote: Shrink ati_remote_tbl structureGeorge Spelvin1-4/+4
The variable types are simply larger than they need to be. Shrink to signed and unsigned chars. Signed-off-by: George Spelvin <linux@horizon.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] ati_remote: Check the checksumGeorge Spelvin1-4/+5
An input report is 4 bytes long, but there are only 12 bits of actual payload. The 4 bytes are: data[0] = 0x14 data[1] = data[2] + data[3] + 0xd5 (a checksum byte) data[2] = the raw scancode (plus toggle bit in msbit) data[3] = channel << 4 (the low 4 bits must be zero) Ignore reports with a bad checksum. Signed-off-by: George Spelvin <linux@horizon.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] rc-core: fix various sparse warningsDavid Härdeman4-10/+10
Fix various sparse warnings under drivers/media/rc/*.c, mostly by making functions static. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] rc-core: rename ir-raw.cDavid Härdeman2-2/+2
Better to be coherent and prefix this file with rc-, in order to help to identify to what subsystem it belongs. This is in preparaton for a latter patch that will transform the raw handling into a separate module. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] rc-core: merge rc5 and streamzap decodersDavid Härdeman7-218/+43
Now that the protocol is part of the scancode, it is pretty easy to merge the rc5 and streamzap decoders. An additional advantage is that the decoder is now stricter as it waits for the trailing silence before determining that a command is a valid rc5/streamzap command (which avoids collisions that I've seen with e.g. Sony protocols). Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] rc-core: rename dev->scanmask to dev->scancode_maskDavid Härdeman1-2/+2
We already have dev->scancode_filter and dev->scancode_wakeup_filter so rename dev->scanmask to dev->scancode_mask for consistency. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-25[media] rc-core: remove protocol arraysDavid Härdeman29-62/+61
The basic API of rc-core used to be: dev = rc_allocate_device(); dev->x = a; dev->y = b; dev->z = c; rc_register_device(); which is a pretty common pattern in the kernel, after the introduction of protocol arrays the API looks something like: dev = rc_allocate_device(); dev->x = a; rc_set_allowed_protocols(dev, RC_BIT_X); dev->z = c; rc_register_device(); There's no real need for the protocols to be an array, so change it back to be consistent (and in preparation for the following patches). [m.chehab@samsung.com: added missing changes at some files] Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] rc-core: simplify sysfs codeDavid Härdeman2-121/+151
Simplify and cleanup the sysfs code a bit. [m.chehab@samsung.com: rebased and fixed a CodingStyle issue] Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] saa7134: NEC scancode fixDavid Härdeman1-34/+34
This driver codes the two address bytes in reverse order when compared to the other drivers, so make it consistent (and update the keymap, note that the result is a prefix change from 0x6b86 -> 0x866b, and the latter is pretty common among the NECX keymaps. While not conclusive, it's still a strong hint that the change is correct). Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] rc-core: document the protocol typeDavid Härdeman18-44/+94
Right now the protocol information is not preserved, rc-core gets handed a scancode but has no idea which protocol it corresponds to. This patch (which required reading through the source/keymap for all drivers, not fun) makes the protocol information explicit which is important documentation and makes it easier to e.g. support multiple protocols with one decoder (think rc5 and rc-streamzap). The information isn't used yet so there should be no functional changes. [m.chehab@samsung.com: rebased, added cxusb and removed bad whitespacing] Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-23[media] bt8xx: fixup RC5 decodingDavid Härdeman1-56/+56
The bt8xx driver does RC5 decoding for Nebula digi hardware, but includes some pointless limitations (both start bits must be one, the device/address/system must be 0x00). Remove those limitations and update the keymap to use the full RC5 scancode (fortunately the 0x00 address means that this is perfectly backwards compatible). Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-04[media] rc: add sunxi-ir driverAlexander Bersenev3-0/+329
This patch adds driver for sunxi IR controller. It is based on Alexsey Shestacov's work based on the original driver supplied by Allwinner. Signed-off-by: Alexander Bersenev <bay@hackerdom.ru> Signed-off-by: Alexsey Shestacov <wingrime@linux-sunxi.org> [hdegoede@redhat.com: Changed compatible to sun4i-a10-ir] Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-06-17[media] rc: img-ir: Expand copyright headers with GPL noticesJames Hogan11-0/+55
Add the basic GPLv2+ license notice to the copyright headers at the top of all the source files in the img-ir driver. Reported-by: David Härdeman <david@hardeman.nu> Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-06-04Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media into nextLinus Torvalds1-30/+35
Pull media updates from Mauro Carvalho Chehab: "This contains: - a new frontend/tuner driver set for si2168 and sa2157 - Videobuf 2 core now supports DVB too - A new gspca sub-driver (dtcs033) - saa7134 is now converted to use videobuf2 - add support for 4K timings - several other driver fixes and improvements PS. This pull request is shorter than usual, partly because I have some other patches on topic branches that I'll be sending you later this week" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (286 commits) [media] au0828-dvb: restore its permission to 644 [media] xc5000: delay tuner sleep to 5 seconds [media] xc5000: Don't use whitespace before tabs [media] xc5000: fix CamelCase [media] xc5000: Don't wrap msleep() [media] xc5000: get rid of positive error codes [media] au0828: reset streaming when a new frequency is set [media] au0828: Improve debug messages for urb_completion [media] au0828: Cancel stream-restart operation if frontend is disconnected [media] dib0700: fix RC support on Hauppauge Nova-TD [media] USB: as102_usb_drv.c: Remove useless return variables [media] v4l: Fix documentation of V4L2_PIX_FMT_H264_MVC and VP8 pixel formats [media] m5mols: Replace missing header [media] staging: lirc: Fix sparse warnings [media] fix mceusb endpoint type identification/handling [media] az6027: Added the PID for a new revision of the Elgato EyeTV Sat DVB-S Tuner [media] DocBook media: fix typo [media] adv7604: Add missing include to linux/types.h [media] v4l: Validate fields in the core code for subdev EDID ioctls [media] v4l: Add support for DV timings ioctls on subdev nodes ...
2014-05-29USB: media: streamzap: remove CONFIG_USB_DEBUGGreg Kroah-Hartman1-9/+0
It wasn't even being used for anything, so remove the test for the config option (as the config option isn't present anymore), and remove the unused module parameter "debug" so as to not confuse anyone. Cc: Mauro Carvalho Chehab <m.chehab@samsung.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: "Antti Seppälä" <a.seppala@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-29USB: media: redrat3: remove CONFIG_USB_DEBUG usageGreg Kroah-Hartman1-42/+21
Use the dev_dbg dynamic infrastructure instead of rolling our own custom debug logic. This is needed as CONFIG_USB_DEBUG is now gone. Cc: Mauro Carvalho Chehab <m.chehab@samsung.com> Cc: Sean Young <sean@mess.org> Cc: Hans Verkuil <hans.verkuil@cisco.com> Cc: Jonathan McCrohan <jmccrohan@gmail.com> Cc: James Hogan <james.hogan@imgtec.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-29USB: media: redrat3: remove unneeded tracing macroGreg Kroah-Hartman1-37/+2
The rr3_ftr function duplicates the in-kernel tracing logic, so remove it. This is step 1 of of removing the CONFIG_USB_DEBUG depandancy in this driver. Cc: Mauro Carvalho Chehab <m.chehab@samsung.com> Cc: Sean Young <sean@mess.org> Cc: Hans Verkuil <hans.verkuil@cisco.com> Cc: Jonathan McCrohan <jmccrohan@gmail.com> Cc: James Hogan <james.hogan@imgtec.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-25[media] fix mceusb endpoint type identification/handlingMatt DeVillier1-30/+35
Change the I/O endpoint handling of the mceusb driver to respect the endpoint type reported by device (bulk/interrupt), rather than treating all endpoints as type interrupt, which breaks devices using bulk endpoints when connected to a xhci controller. Accordingly, change the function calls to initialize an endpoint's transfer pipe and urb handlers to use the correct function based on the endpoint type. [m.chehab@samsung.com: Fix merge conflicts and compilation breakage] Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-06[media] rc-core: remove generic scancode filterDavid Härdeman1-35/+53
The generic scancode filtering has questionable value and makes it impossible to determine from userspace if there is an actual scancode hw filter present or not. So revert the generic parts. Based on a patch from James Hogan <james.hogan@imgtec.com>, but this version also makes sure that only the valid sysfs files are created in the first place. Signed-off-by: David Härdeman <david@hardeman.nu> Acked-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-06[media] rc-core: split dev->s_filterDavid Härdeman2-8/+31
Overloading dev->s_filter to do two different functions (set wakeup filters and generic hardware filters) makes it impossible to tell what the hardware actually supports, so create a separate dev->s_wakeup_filter and make the distinction explicit. Signed-off-by: David Härdeman <david@hardeman.nu> Acked-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-06[media] rc-core: do not change 32bit NEC scancode format for nowDavid Härdeman3-59/+59
This reverts 18bc17448147e93f31cc9b1a83be49f1224657b2 and changes the code at img-ir-nec.c to use the order used by the other NEC decoders. The original patch ignored the fact that NEC32 scancodes are generated not only in the NEC raw decoder but also directly in some drivers. Whichever approach is chosen it should be consistent across drivers and this patch needs more discussion. Furthermore, I'm convinced that we have to stop playing games trying to decipher the "meaning" of NEC scancodes (what's the customer/vendor/address, which byte is the MSB, etc). Signed-off-by: David Härdeman <david@hardeman.nu> Acked-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14[media] rc: img-ir: hw: Fix min/max bits setupJames Hogan1-3/+3
The calculated values for the minlen and maxlen fields, which were rounded to multiples of 2 and clamped to a valid range, were left unused. Use them in the calculation of the register value rather than using the raw input minlen and maxlen. This fixes the following warning with a W=1 build: drivers/media/rc/img-ir/img-ir-hw.c In function ‘img_ir_free_timing’: drivers/media/rc/img-ir/img-ir-hw.c +228 :23: warning: variable ‘maxlen’ set but not used [-Wunused-but-set-variable] drivers/media/rc/img-ir/img-ir-hw.c +228 :15: warning: variable ‘minlen’ set but not used [-Wunused-but-set-variable] Reported-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14[media] rc: img-ir: jvc: Remove unused no-leader timingsJames Hogan1-11/+0
The JVC timings included timings intended for the secondary decoder (which matches messages with no leader), however they were in the wrong part of the timings structure, repeating s00 and s01 rather than being in s10 and s11. Distinct repeat timings can't be properly supported yet for JVC anyway since the scancode callback cannot determine which decoder matched the message, so for now remove these timings and don't bother to enable the secondary decoder. This fixes the following warnings with W=1: drivers/media/rc/img-ir/img-ir-jvc.c +76 :3: warning: initialized field overwritten [-Woverride-init] drivers/media/rc/img-ir/img-ir-jvc.c +76 :3: warning: (near initialization for ‘img_ir_jvc.timings.s00’) [-Woverride-init] drivers/media/rc/img-ir/img-ir-jvc.c +81 :3: warning: initialized field overwritten [-Woverride-init] drivers/media/rc/img-ir/img-ir-jvc.c +81 :3: warning: (near initialization for ‘img_ir_jvc.timings.s01’) [-Woverride-init] Reported-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-14[media] rc: img-ir: hw: Remove unnecessary semi-colonJames Hogan1-1/+1
Fix a coccicheck warning in img-ir driver: drivers/media/rc/img-ir/img-ir-hw.c:500:2-3: Unneeded semicolon Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-13[media] media: rc-core: use %s in rc_map_get() module loadKees Cook1-1/+1
rc_map_get() takes a single string literal for the module to load, so make sure it cannot be used as a format string in the call to request_module(). Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc-main: fix missing unlock if no devno leftJames Hogan1-8/+8
While playing with make coccicheck I noticed this message: drivers/media/rc/rc-main.c:1245:3-9: preceding lock on line 1238 It was introduced by commit 587d1b06e07b ([media] rc-core: reuse device numbers) which returns -ENOMEM after a mutex_lock without first unlocking it when there are no more device numbers left. The added code doesn't depend on the device lock, so move it before the lock is taken. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: img-ir: add Sanyo decoder moduleJames Hogan4-0/+134
Add an img-ir module for decoding the Sanyo infrared protocol. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: img-ir: add Sharp decoder moduleJames Hogan4-0/+111
Add an img-ir module for decoding the Sharp infrared protocol. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: img-ir: add Sony decoder moduleJames Hogan4-0/+157
Add an img-ir module for decoding the Sony infrared protocol. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-11[media] rc: img-ir: add JVC decoder moduleJames Hogan4-0/+104
Add an img-ir module for decoding the JVC infrared protocol. Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>