Commit graph

21531 commits

Author SHA1 Message Date
Matthias Schwarzott
b046d3ad38 [media] tda10071: Fix dependency to REGMAP_I2C
Without I get this error for by dvb-card:
  tda10071: Unknown symbol devm_regmap_init_i2c (err 0)
  cx23885_dvb_register() dvb_register failed err = -22
  cx23885_dev_setup() Failed to register dvb adapters on VID_B

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 15:27:39 -02:00
Lars-Peter Clausen
f7488c50f3 [media] dm1105: Remove unnecessary synchronize_irq() before free_irq()
Calling synchronize_irq() right before free_irq() is quite useless. On one
hand the IRQ can easily fire again before free_irq() is entered, on the
other hand free_irq() itself calls synchronize_irq() internally (in a race
condition free way), before any state associated with the IRQ is freed.

Patch was generated using the following semantic patch:
// <smpl>
@@
expression irq;
@@
-synchronize_irq(irq);
 free_irq(irq, ...);
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 15:09:28 -02:00
Heiner Kallweit
c1500ba0b6 [media] media: rc: remove unneeded code
Now that that the decoder modules are loaded on-demand we can move
loading the lirc module to rc_register_device directly and remove
unneeded functions and comments.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
2015-12-03 15:01:11 -02:00
Matthias Schwarzott
94c1733468 [media] si2165: Add DVB-C support for HVR-4400/HVR-5500
It works only for HVR-4400/HVR-5500.
For WinTV-HVR-930C-HD it fails with bad/no reception
for unknown reasons.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 12:21:27 -02:00
Matthias Schwarzott
3b0c9807b7 [media] si2165: Prepare si2165_set_frontend() for future DVB-C support
The current si2165_set_frontend() function actually works only for DVB-T.
Split it into two functions, preparing the code to support DVB-C.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 12:19:57 -02:00
Matthias Schwarzott
25e7375309 [media] si2165: set list of DVB-T registers together
Use si2165_write_reg_list() to do the DVB-T mode initialization altogether.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 12:17:07 -02:00
Matthias Schwarzott
542fb3c56b [media] si2165: Simplify si2165_set_if_freq_shift usage
si2165_set_if_freq_shift() needs to call get_if_frequency() in order to do
the right shift. Add such logic inside the function, simplifying the logic
for the callers.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 12:10:12 -02:00
Matthias Schwarzott
75d62fc046 [media] si2165: move setting ts config to init
The TS config is fixed, so no need to write it for each tune.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 12:07:03 -02:00
Matthias Schwarzott
eae56684a0 [media] si2165: only write agc registers after reset before start_syncro
Datasheet says they must be rewritten after reset.
But it only makes sense to write them when trying to tune afterwards.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 12:06:16 -02:00
Matthias Schwarzott
a5293dbd70 [media] si2165: create function si2165_write_reg_list for writing register lists
It is common the need of writing a table of values. Add a function to provide a
helper to address such case. This will allow further code cleanups.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 12:03:23 -02:00
Matthias Schwarzott
c1c49674ea [media] si2165: rename si2165_set_parameters to si2165_set_frontend
No functional changes.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 12:01:31 -02:00
Matthias Schwarzott
d9a201df56 [media] si2165: rename frontend -> fe
No functional changes.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 12:00:54 -02:00
Aviv Greenberg
120c41d347 [media] UVC: Add support for ds4 depth camera
Add support for Intel DS4 depth camera in uvc driver.
This includes adding new uvc GUIDs for the new pixel formats,
adding new V4L pixel format definition to user api headers,
and updating the uvc driver GUID-to-4cc tables with the new formats.

Change-Id: If240d95a7d4edc8dcc3e02d58cd8267a6bbf6fcb

Tested-by: Greenberg, Aviv D <aviv.d.greenberg@intel.com>
Signed-off-by: Aviv Greenberg <aviv.d.greenberg@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 11:37:44 -02:00
Julia Lawall
083206fc3f [media] cx231xx: constify cx2341x_handler_ops structures
The cx2341x_handler_ops structures are never modified, so declare them as
const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 11:27:08 -02:00
Julia Lawall
22dbec265c [media] media, sound: tea575x: constify snd_tea575x_ops structures
The snd_tea575x_ops structures are never modified, so declare them as
const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 11:26:45 -02:00
Hans Verkuil
85f9e06c59 [media] v4l2-dv-timings: add new arg to v4l2_match_dv_timings
Add the new match_reduced_fps argument to v4l2_match_dv_timings().
Depending on the situation you may or may not desire to match the
reduced_fps flag. Typically only HDMI transmitters will need to
check for this flag.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03 11:26:14 -02:00
Mauro Carvalho Chehab
10897dacea Linux 4.4-rc2
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWUmHZAAoJEHm+PkMAQRiGHtcH/RVRsn8re0WdRWYaTr9+Hknm
 CGlRJN4LKecttgYQ/2bS1QsDbt8usDPBiiYVopqGXQxPBmjyDAqPjsa+8VzCaVc6
 WA+9LDB+PcW28lD6BO+qSZCOAm7hHSZq7dtw9x658IqO+mI2mVeCybsAyunw2iWi
 Kf5q90wq6tIBXuT8YH9MXGrSCQw00NclbYeYwB9CmCt9hT/koEFBdl7uFUFitB+Q
 GSPTz5fXhgc5Lms85n7flZlrVKoQKmtDQe4/DvKZm+SjsATHU9ru89OxDBdS5gSG
 YcEIM4zc9tMjhs3GC9t6WXf6iFOdctum8HOhUoIN/+LVfeOMRRwAhRVqtGJ//Xw=
 =DCUg
 -----END PGP SIGNATURE-----

Merge tag 'v4.4-rc2' into patchwork

Linux 4.4-rc2

Several PCI media drivers got broken on Kernel 4.4-rc1, due to
pci_set_dma_mask() regressions. So, we need to add those fixes back
for the media drivers to work again.

* tag 'v4.4-rc2': (335 commits)
  Linux 4.4-rc2
  slab/slub: adjust kmem_cache_alloc_bulk API
  slub: add missing kmem cgroup support to kmem_cache_free_bulk
  slub: fix kmem cgroup bug in kmem_cache_alloc_bulk
  slub: optimize bulk slowpath free by detached freelist
  slub: support for bulk free with SLUB freelists
  parisc: Map kernel text and data on huge pages
  parisc: Add Huge Page and HUGETLBFS support
  parisc: Use long branch to do_syscall_trace_exit
  parisc: Increase initial kernel mapping to 32MB on 64bit kernel
  parisc: Initialize the fault vector earlier in the boot process.
  parisc: Add defines for Huge page support
  parisc: Drop unused MADV_xxxK_PAGES flags from asm/mman.h
  serial: export fsl8250_handle_irq
  serial: 8250_mid: Add missing dependency
  tty: audit: Fix audit source
  serial: etraxfs-uart: Fix crash
  serial: fsl_lpuart: Fix earlycon support
  bcm63xx_uart: Use the device name when registering an interrupt
  tty: Fix direct use of tty buffer work
  ...
2015-11-23 14:16:58 -02:00
Christoph Hellwig
1a47de6e4a various: fix pci_set_dma_mask return value checking
pci_set_dma_mask returns a negative errno value, not a bool like
pci_dma_supported.  This of course was just a giant test for attention :)

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Jongman Heo <jongman.heo@samsung.com>
Tested-by: Jongman Heo <jongman.heo@samsung.com>	[pcnet32]
Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Antti Palosaari <crope@iki.fi>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-20 16:17:32 -08:00
Arnd Bergmann
ca78946853 [media] davinci: add i2c Kconfig dependencies
All the davinci media drivers are using the i2c framework, and
fail to build if that is ever disabled, e.g.:

media/platform/davinci/vpif_display.c: In function 'vpif_probe':
media/platform/davinci/vpif_display.c:1298:14: error: implicit declaration of function 'i2c_get_adapter' [-Werror=implicit-function-declaration]

This adds explicit Kconfig dependencies so we don't see the
driver options if I2C is turned off.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 12:03:52 -02:00
Mauro Carvalho Chehab
a733a41a50 [media] fix dvb_frontend_sleep_until() logic
As pointed by Laurent Navet:
	"Calling ktime_add_us() seems useless as is only useful
	 for it's return value which is ignored."

That's reported by coverity CID 1309761.

Laurent proposed to just remove ktime_add_us, but the fact is that
the logic of this function is broken. Instead, we need to use the
value of the timeout, and ensure that it will work on the loops
to emulate the legacy DiSEqC ioctl (FE_DISHNETWORK_SEND_LEGACY_CMD).

Please notice that the logic was also broken if, for any reason,
msleep() would sleep a little less than what it was expected, as
newdelta would be smaller than delta, and udelay() would not be called.

It should also be noticed that nobody noticed that trouble before
likely because the FE_DISHNETWORK_SEND_LEGACY_CMD is not used
anymore by modern DVB applications.

Reported-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:57:08 -02:00
Heiner Kallweit
439be34800 [media] media: cx23885: fix type of allowed_protos
Protocol lists are represented as 64-bit bitmaps,
therefore use u64 instead of unsigned long.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:54:21 -02:00
Mauro Carvalho Chehab
850c8a7d68 smsir.h: remove a now duplicated definition (IR_DEFAULT_TIMEOUT)
This macro is now part of the core. Remove from Siano driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:41:36 -02:00
Heiner Kallweit
d80ca8bd71 [media] media: rc: move check whether a protocol is enabled to the core
Checking whether a protocol is enabled and calling the related decoder
functions should be done by the rc core, not the protocol handlers.

Properly handle lirc considering that no protocol bit is set for lirc.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:39:17 -02:00
Heiner Kallweit
acc1c3c688 [media] media: rc: load decoder modules on-demand
Remove code for unconditional decoder module loading (except lirc).

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:38:41 -02:00
Heiner Kallweit
53df877717 [media] media: rc: constify struct proto_names
Declare struct proto_names and its member name as const.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:38:14 -02:00
Heiner Kallweit
9f0bf366d7 [media] media: rc: preparation for on-demand decoder module loading
Prepare on-demand decoder module loading by adding a module_name member
to struct proto_names and introducing the related load function.

After this patch of the series the decoder modules are still loaded
unconditionally.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:37:40 -02:00
Heiner Kallweit
93cffffc18 [media] media: rc: fix decoder module unloading
Currently, if a decoder module is unloadad, the respective protocol
is still shown as enabled (if it was enabled before).
Fix this by resetting the respective protocol bits if a decoder
module is unloaded.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:36:29 -02:00
Vladis Dronov
fa52bd506f [media] usbvision: fix crash on detecting device with invalid configuration
The usbvision driver crashes when a specially crafted usb device with invalid
number of interfaces or endpoints is detected. This fix adds checks that the
device has proper configuration expected by the driver.

Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:36:02 -02:00
Arno Bauernöppel
1efc21701d [media] Add support for dvb usb stick Hauppauge WinTV-soloHD
This patch adds support for the DVB-T/C/T2 usb stick WinTV-soloHD from
Hauppauge. It adds the usb ID 2040:0264 Hauppauge to the cards of the
driver em28xx.

I successfully tested DVB-T/C and the IR remote control with the
firmware dvb-demod-si2168-b40-01.fw.

Signed-off-by: Arno Bauernoeppel <arno@aziraphale.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:34:32 -02:00
Matthias Schwarzott
18349f4009 [media] si2165: fix checkpatch issues
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:23:42 -02:00
Matthias Schwarzott
599bedb7d1 [media] cx231xx_dvb: use demod_i2c for demod attach
Tested:
* CX231XX_BOARD_HAUPPAUGE_930C_HD_1113xx
* CX231XX_BOARD_HAUPPAUGE_930C_HD_1114xx

Not Tested:
* CX231XX_BOARD_HAUPPAUGE_EXETER
* CX231XX_BOARD_HAUPPAUGE_955Q

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:23:06 -02:00
Julia Lawall
9bca62661e [media] ttusb-dec: constify ttusbdecfe_config structure
The ttusbdecfe_config structure is never modified, so declare it
as const.

Other references to this structure type were already declared as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:22:15 -02:00
Julia Lawall
9c5e44a076 [media] drivers/media/usb/dvb-usb-v2: constify mxl111sf_demod_config structure
The mxl111sf_demod_config structure is never modified, so declare it
as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Michael Ira Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:20:18 -02:00
Walter Cheuk
c0a182b699 [media] tv tuner max2165 driver: extend frequency range
Extend the frequency range to cover Hong Kong's digital TV broadcasting;
RTHK TV uses 802MHz and is not covered now. Tested on my TV tuner card
"MyGica X8558 Pro".

Signed-off-by: Walter Cheuk <wwycheuk@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:19:42 -02:00
Laurent Pinchart
b446631c5a [media] v4l: omap_vout: Don't free buffers if they haven't been allocated
The VRFB buffers are freed when the device is closed even if they
haven't been allocated by a call to VIDIOC_REQBUFS, resulting in a
crash. Fix it by not trying to free buffers that are not allocated.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:15:20 -02:00
Laurent Pinchart
8afe97be37 [media] uvcvideo: Enable UVC 1.5 device detection
UVC 1.5 devices report a bInterfaceProtocol value set to 1 in their
interface descriptors. The uvcvideo driver only matches on
bInterfaceProtocol 0, preventing those devices from being detected.

More changes to the driver are needed for full UVC 1.5 compatibility.
However, at least the UVC 1.5 Microsoft Surface Pro 3 cameras have been
reported to work out of the box with the driver with an updated match
table.

Enable UVC 1.5 support in the match table to support the devices that
can work with the current driver implementation. Devices that can't will
fail, but that's hardly a regression as they're currently not detected
at all anyway.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:13:19 -02:00
Markus Elfring
1ea7252d97 [media] c8sectpfe: Combine three checks into a single if block
The variable "tsin" was checked three times in a loop iteration of the
c8sectpfe_tuner_unregister_frontend() function.
This implementation detail could be improved by the combination of the
involved statements into a single if block so that this variable will be
checked only once there.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 10:10:22 -02:00
Markus Elfring
06b6fea859 [media] c8sectpfe: Delete unnecessary checks before two function calls
The functions i2c_put_adapter() and module_put() test whether their
argument is NULL and then return immediately.
Thus the tests around their calls are not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 10:09:56 -02:00
Heiner Kallweit
4dc0e908a5 [media] media: rc-core: simplify logging in rc_register_device
Simplify the logging.

I had some doubts about using the elvis operator as it's GNU extension.
However GNU extensions are explicitely allowed and this operator is
used at several places in the kernel code.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 09:38:19 -02:00
Heiner Kallweit
211477fe35 [media] media: rc: nuvoton-cir: replace nvt_pr with dev_ functions
Replace nvt_pr with the respective dev_ functions thus slightly
simplifying the code.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 09:37:34 -02:00
Heiner Kallweit
af08233433 [media] media: rc: nuvoton-cir: switch chip detection message to info level
Switch the info about the detected chip type from debug to info level
as it might be useful not only for debugging purposes.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 09:37:11 -02:00
Heiner Kallweit
068fb7ddd5 [media] media: rc: nuvoton-cir: simplify debug code
Instead of explicitely checking debug use nvt_dbg like in other parts
of the driver thus simplifying the code.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 09:36:48 -02:00
Heiner Kallweit
d0b528d5f7 [media] media: rc: nuvoton-cir: add support for the NCT6779D
Add support for the NCT6779D. It's found e.g. on the Zotac CI321 mini-pc
and I successfully tested it on this device.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 09:36:15 -02:00
Heiner Kallweit
6a5a336079 [media] media: rc: nuvoton-cir: make nvt_hw_detect void
nvt_hw_detect always returns 0, therefore make it return void.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 09:35:54 -02:00
Heiner Kallweit
b5cf725c04 [media] media: rc: nuvoton-cir: improve chip detection
Make the chip detection code more similar to the one used for the
same chips in watchdog/w83627hf_wdt.c and hwmon/w83627ehf.c.

Apart from better maintainability we gain
- unified naming of chips (e.g. 677C -> NCT6776F)
- driver works with all revisions of the chips
  (least 4 bits of id are masked)

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 09:35:32 -02:00
Heiner Kallweit
099256e58e [media] media: rc: nuvoton-cir: switch resource handling to devm functions
Switch to managed resource handling using the devm_ functions.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 09:34:28 -02:00
Heiner Kallweit
d5b04311cb [media] media: rc: nuvoton-cir: remove unneeded lock
chip_major / chip_minor are accessed sequentially in probe only.
Therefore no lock is needed.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 09:34:02 -02:00
Heiner Kallweit
2bbf9e061a [media] media: rc: nuvoton-cir: remove unneeded IRQ_RETVAL usage
Using IRQ_RETVAL is unneeded here. IRQ_NONE / IRQ_HANDLED can be
returned directly.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 09:33:27 -02:00
Heiner Kallweit
1b0621af50 [media] media: rc: ir-sharp-decoder: add support for Denon variant of the protocol
Denon also uses the Sharp protocol, however with different check bits.

It would have been also possible to add this as a separate protocol
but this may not be worth the effort.

Successfully tested with a Denon RC-1002 remote control.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 09:32:35 -02:00
Tina Ruchandani
dd4c22a61e [media] rc-core: Remove 'struct timeval' usage
streamzap uses 'struct timeval' to store the start time of a signal for
gap tracking. struct timeval uses a 32-bit seconds representation which
will overflow in year 2038 and beyond. Replace struct timeval with ktime_t
which uses a 64-bit seconds representation and is 2038 safe. This patch
uses ktime_get_real() preserving the use of wall-clock time in the
original code.

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 09:31:45 -02:00