summaryrefslogtreecommitdiff
path: root/drivers/media/pci
AgeCommit message (Collapse)Author
2015-05-18[media] sta2x11: use monotonic timestampHans Verkuil
V4L2 drivers should use MONOTONIC timestamps instead of gettimeofday, which is affected by daylight savings time. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Federico Vaga <federico.vaga@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-14[media] saa7164: use an MSI interrupt when availableBrendan McGrath
Enhances driver to use an MSI interrupt when available. Adds the module option 'enable_msi' (type bool) which by default is enabled. Can be set to 'N' to disable. Fixes (or can reduce the occurrence of) a crash which is most commonly reported when both digital tuners of the saa7164 chip is in use. A reported example can be found here: http://permalink.gmane.org/gmane.linux.drivers.video-input-infrastructure/83948 Reviewed-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Brendan McGrath <redmcg@redmandi.dyndns.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] cx25821: cx25821-medusa-reg.h: fix 0x0x prefixAntonio Ospite
Fix the 0x0x prefix in integer constants. In this case a padding 0 must also be inserted to make the constants look like all the other 16 bits ones. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: fix CodingStyle issues on the lines touched by pr_foo refactorMauro Carvalho Chehab
Several lines touched by the pr_foo refactoring patches are not following the Linux Coding style. While we won't be fixing the style globally at the driver, we should, at least, fix on the lines we touched. Basically, this patch add (or remove) whitespaces and blank lines where needed. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: avoid complex macro warningsMauro Carvalho Chehab
The debug macros are not properly defined, as they generate warnings like: ERROR: Macros with complex values should be enclosed in parentheses +#define core_dbg(fmt, arg...) if (core_debug) \ + printk(KERN_DEBUG pr_fmt("core: " fmt), ## arg) Use do { } while (0) for those macros. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: replace remaining occurences or printk()Mauro Carvalho Chehab
Instead of using printk(), use pr_foo() macros. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134-i2c: simplify debug dump and use pr_info()Mauro Carvalho Chehab
Instead of implement its own hexdump logic, use the printk format, and convert to use pr_info(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: change the debug macros for IR inputMauro Carvalho Chehab
Rename the macros to input_dbg() and ir_dbg(), using pr_fmt() on both, to be coherent with the other debug macro changes. The ir_dbg() also prints the IR name. I'm not sure if it is a good idea to keep both macros here, but merging them would require tests on different flavors of saaa7134-based boards. So, for now, let's keep both. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: change the debug macros for video and vbiMauro Carvalho Chehab
rename the macro to vbi_dbg()/video_dbg() and use pr_fmt(), to be coherent with the other debug macro changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: change the debug macros for saa7134-tvaudioMauro Carvalho Chehab
use just one macro instead of 2, naming it as audio_dbg() and using pr_fmt(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134-ts: use pr_fmt() at the debug macroMauro Carvalho Chehab
instead of using dev->name, let's use pr_fmt() like on the other parts of saa7134. Also, rename the debug macro to ts_dbg() to match the namespace for the debug macros. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134-i2c: make debug macros to use pr_fmt()Mauro Carvalho Chehab
Converting debug prints to use pr_foo() is not trivial, as the result will be a way worse than what's provided here, due to the pieces of the code that prints the I2C transfers. Those use a lot pr_cont(), and, depending on using either level 1 or 2, a different set of macros are selected. So, let's replace d1printk() and d2printk() macros by i2c_dbg() and i2c_count() adding a debug level there. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: better handle core debug messagesMauro Carvalho Chehab
On media drivers, debugging messages should be grouped into categories, as this makes easier to debug the driver. In the case of saa7134, the core has 2 debug categories, one for IRQ, and another one for the core itself. The IRQ have actually 2 levels of debug. So, instead of using pr_dbg(), where everything would be in the same box, let's define two macros that use pr_fmt(), one for the core, and another one for irq. With that, we can replace the remaining printk() occurrences at the core to use either core_dbg() or irq_dbg(), depending on the group of debug macros that need to be enabled. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: use pr_warn() on some places where no KERN_foo were usedMauro Carvalho Chehab
On a few places, mostly during board detection, some printk() macros were called without especifying any message level. Those are actually warnings. So, use pr_warn() for them. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134-empress: use pr_debug() for the saa7134 empress moduleMauro Carvalho Chehab
As this module doesn't use any debug level, it is easy to just replace all debug printks by pr_debug(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134-dvb: use pr_debug() for the saa7134 dvb moduleMauro Carvalho Chehab
As this module doesn't use any debug level, it is easy to just replace all debug printks by pr_debug(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134-dvb: get rid of wprintk() macroMauro Carvalho Chehab
wprintk() macro is now just a wrapper for pr_warn(). Get rid of it! Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134-alsa: use pr_debug() instead of printkMauro Carvalho Chehab
On saa7134-alsa, there is just one printk macro that use a different debug level. It should be easy to enable/disable this one using dynamic_printk, if one need to individually control it. So, this module can easily use pr_debug() instead of using its own macros. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: fix a few other occurrences of KERN_INFO/KERN_WARNINGMauro Carvalho Chehab
On a few places, the search expression used on the script that replaced pr_info/pr_warn didn't match, because the string were on the next line. It is best to manually edit those lines, and re-indent the paragraphs. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: instead of using printk KERN_foo, use pr_fooMauro Carvalho Chehab
Replaces all occurrences of printk with KERN_INFO, KERN_WARNING and KERN_ERR to pr_info/pr_warning, pr_err, using this small shell script: for i in drivers/media/pci/saa7134/*.[ch]; do sed s,'printk(KERN_INFO ','pr_info(',g <$i >a && mv a $i; done for i in drivers/media/pci/saa7134/*.[ch]; do sed s,'printk(KERN_ERR ','pr_err(',g <$i >a && mv a $i; done for i in drivers/media/pci/saa7134/*.[ch]; do sed s,'printk(KERN_WARNING ','pr_warn(',g <$i >a && mv a $i; done Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-13[media] saa7134: prepare to use pr_foo macrosMauro Carvalho Chehab
Add a pr_fmt macro, and move saa7134.h header to the beginning, to avoid warnings when using the pr_foo macros. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-12[media] si2157: support selection of IF interfaceOlli Salonen
The chips supported by the si2157 driver have two IF outputs (either pins 12+13 or pins 9+11). Instead of hardcoding the output to be used add an option to choose which output shall be used. As this patch changes the default behaviour, the IF interface is specified in each driver currently using si2157 driver. This is to keep bisectability. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-12[media] mantis: fix error handlingSilvan Jegen
Remove dead code, make goto label names more expressive and add a label in order to call mantis_dvb_exit if mantis_uart_init fails. Also make sure that mantis_pci_exit is called if we fail the mantis_stream_control call and that we call mantis_i2c_exit if mantis_get_mac fails. [mchehab@osg.samsung.com: fix merge conflict] Signed-off-by: Silvan Jegen <s.jegen@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: fix compiler warningHans Verkuil
drivers/media/pci/saa7164/saa7164-dvb.c: In function ‘saa7164_dvb_register’: drivers/media/pci/saa7164/saa7164-dvb.c:701:7: warning: ‘client_tuner’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (!client_tuner || !client_tuner->dev.driver) ^ Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] v4l2: replace s_mbus_fmt by set_fmt in bridge driversHans Verkuil
Replace all calls to s_mbus_fmt in bridge drivers by calls to the set_fmt pad op. Remove the old try/s_mbus_fmt video ops since they are now no longer used. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] v4l2: replace try_mbus_fmt by set_fmt in bridge driversHans Verkuil
Replace all calls to try_mbus_fmt in bridge drivers by calls to the set_fmt pad op. [mchehab@osg.samsung.com: fix a merge conflict at mcam-core.c] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Scott Jiang <scott.jiang.linux@gmail.com> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] v4l2: replace s_mbus_fmt by set_fmtHans Verkuil
The s_mbus_fmt video op is a duplicate of the pad op. Replace all uses in sub-devices by the set_fmt() pad op. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] v4l2: replace video op g_mbus_fmt by pad op get_fmtHans Verkuil
The g_mbus_fmt video op is a duplicate of the pad op. Replace all uses by the get_fmt pad op and remove the video op. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com> Cc: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01dt3155: fix CodingStyle issuesMauro Carvalho Chehab
There are a few lines longer than 80 cols for no good reason. Fix them sooner than latter, making checkpatch.pl happy. Cc: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] dt3155: add GFP_DMA32 flag to vb2 queueHans Verkuil
Ensure that buffers are allocated from the DMA32 zone since this device only handles 32 bit DMA addresses. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] dt3155: move out of staging into drivers/media/pciHans Verkuil
The dt3155 code is now in good shape, so move it out of staging into drivers/media/pci. Mark in MAINTAINERS that I'll do Odd Fixes for this driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] cx18: add missing caps for the PCM video deviceHans Verkuil
The cx18 PCM video device didn't have any capabilities set, which caused a warnings in the v4l2 core: [ 6.229393] ------------[ cut here ]------------ [ 6.229414] WARNING: CPU: 1 PID: 593 at drivers/media/v4l2-core/v4l2-ioctl.c:1025 v4l_querycap+0x41/0x70 [videodev]() [ 6.229415] Modules linked in: cx18_alsa mxl5005s s5h1409 tuner_simple tuner_types cs5345 tuner intel_rapl iosf_mbi x86_pkg_temp_thermal coretemp raid1 snd_hda_codec_realtek kvm_intel snd_hda_codec_generic snd_hda_codec_hdmi kvm snd_oxygen(+) snd_hda_intel snd_oxygen_lib snd_hda_controller snd_hda_codec snd_mpu401_uart iTCO_wdt snd_rawmidi iTCO_vendor_support snd_hwdep crct10dif_pclmul crc32_pclmul crc32c_intel snd_seq cx18 snd_seq_device ghash_clmulni_intel videobuf_vmalloc tveeprom cx2341x snd_pcm serio_raw videobuf_core vfat dvb_core fat v4l2_common snd_timer videodev snd lpc_ich i2c_i801 joydev mfd_core mei_me media soundcore tpm_infineon soc_button_array tpm_tis mei shpchp tpm nfsd auth_rpcgss nfs_acl lockd grace sunrpc binfmt_misc i915 nouveau mxm_wmi wmi e1000e ttm i2c_algo_bit drm_kms_helper [ 6.229444] drm ptp pps_core video [ 6.229446] CPU: 1 PID: 593 Comm: v4l_id Not tainted 3.19.3-200.fc21.x86_64 #1 [ 6.229447] Hardware name: Gigabyte Technology Co., Ltd. Z87-D3HP/Z87-D3HP-CF, BIOS F6 01/20/2014 [ 6.229448] 0000000000000000 00000000d12b1131 ffff88042dacfc28 ffffffff8176e215 [ 6.229449] 0000000000000000 0000000000000000 ffff88042dacfc68 ffffffff8109bc1a [ 6.229451] ffffffffa0594000 ffff88042dacfd90 0000000000000000 ffffffffa04e2140 [ 6.229452] Call Trace: [ 6.229466] [<ffffffff8176e215>] dump_stack+0x45/0x57 [ 6.229469] [<ffffffff8109bc1a>] warn_slowpath_common+0x8a/0xc0 [ 6.229472] [<ffffffff8109bd4a>] warn_slowpath_null+0x1a/0x20 [ 6.229474] [<ffffffffa04ca401>] v4l_querycap+0x41/0x70 [videodev] [ 6.229477] [<ffffffffa04ca6cc>] __video_do_ioctl+0x29c/0x320 [videodev] [ 6.229479] [<ffffffff81227131>] ? do_last+0x2f1/0x1210 [ 6.229491] [<ffffffffa04cc776>] video_usercopy+0x366/0x5d0 [videodev] [ 6.229494] [<ffffffffa04ca430>] ? v4l_querycap+0x70/0x70 [videodev] [ 6.229497] [<ffffffffa04cc9f5>] video_ioctl2+0x15/0x20 [videodev] [ 6.229499] [<ffffffffa04c6794>] v4l2_ioctl+0x164/0x180 [videodev] [ 6.229501] [<ffffffff8122e298>] do_vfs_ioctl+0x2f8/0x500 [ 6.229502] [<ffffffff8122e521>] SyS_ioctl+0x81/0xa0 [ 6.229505] [<ffffffff81774a09>] system_call_fastpath+0x12/0x17 [ 6.229506] ---[ end trace dacd80d4b19277ea ]--- Added the necessary capabilities to stop this warning. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Laura Abbott <labbott@redhat.com> Cc: <stable@vger.kernel.org> # for v3.19 and up Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01saa7164: Fix CodingStyle issues added on previous patchesMauro Carvalho Chehab
The patches that added support for HVR2255 and HVR2205 added some CodingStyle issues. Better to fix it sooner than latter. Cc: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: fix querycap warningHans Verkuil
Fix the VIDIOC_QUERYCAP warning due to the missing device_caps. Don't fill in the version field, the V4L2 core will do that for you. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: <stable@vger.kernel.org> # for v3.19 and up Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: fix HVR2255 ATSC inversion issueSteven Toth
QAM mode in the LGDT3306 auto detects inversion. VSB does not. Forgot to include tis fact in the original patch set. Tested with QAM and VSB after this patch, working fine. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: Copyright updateSteven Toth
Updates the copyright notes at the saa7164 driver. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: Add Digital TV support for the HVR2255 and HVR2205Steven Toth
Adding support for the Hauppauge HVR2255 and Hauppauge HVR2205 PCIe cards. Digital TV for DVB-T and ATSC/US-Cable is known to work. Support for analog RF tuners does not work due to a lack of analog support in the upstream SI2157 driver. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: Improvements for I2C handlingSteven Toth
Workaround oddball I2C issues caused by using newer SILABS devices. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: Adding additional I2C debugSteven Toth
Assists with debugging difficult I2C devices. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7164: I2C improvements for upcoming HVR2255/2205 boardsSteven Toth
SI2168/SI2157 issue single byte address reads. Add support for these. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] bttv: fix missing irq after reloading driverHans Verkuil
If pci_disable_device() isn't called when the driver is removed, then the next time when it is loaded the irq isn't found. I'm pretty sure this used to work in the past, but calling pci_disable_device() is clearly the correct method and this makes it work again. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] cx88: v4l2-compliance fixesHans Verkuil
Fix three v4l2-compliance failures: - the colorspace wasn't set in vidioc_try_fmt_vid_cap(). - the field wasn't set in v4l2_buffer when vb2_buffer_done() was called. - the sequence wasn't set in v4l2_buffer when vb2_buffer_done() was called. This fix also removes the unused buf->count field and starts the count at 0 instead of 1. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] cx23885: fix bad indentationMauro Carvalho Chehab
drivers/media/pci/cx23885/altera-ci.c:762 altera_ci_init() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] saa7134: fix bad indentingMauro Carvalho Chehab
drivers/media/pci/saa7134/saa7134-dvb.c:1682 dvb_init() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] bttv: fix audio hooksMauro Carvalho Chehab
as reported by smatch: drivers/media/pci/bt8xx/bttv-audio-hook.c:201 lt9415_audio() warn: bitwise AND condition is false here drivers/media/pci/bt8xx/bttv-audio-hook.c:241 winfast2000_audio() warn: bitwise AND condition is false here drivers/media/pci/bt8xx/bttv-audio-hook.c:276 pvbt878p9b_audio() warn: bitwise AND condition is false here drivers/media/pci/bt8xx/bttv-audio-hook.c:307 fv2000s_audio() warn: bitwise AND condition is false here drivers/media/pci/bt8xx/bttv-audio-hook.c:334 windvr_audio() warn: bitwise AND condition is false here drivers/media/pci/bt8xx/bttv-audio-hook.c:371 adtvk503_audio() warn: bitwise AND condition is false here there are some serious issues at the audio hook implementation. They're not following what's specified at the DocBook: http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-g-tuner.html#tuner-audmode Basically, it was assuming that the audmode (V4L2_TUNER_MODE_foo) is a variable with a bit maskk. However, it isn't. The bitmask only applies to rxsubchans field (V4L2_TUNER_SUB_foo). As the code is also too complex, and not all hooks were returning both audmode and rxsubchans to a VIDIOC_G_TUNER, rewrite the functions, in order to fix both for get and set tuner ioctls. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-05-01[media] bttv: fix indentingMauro Carvalho Chehab
drivers/media/pci/bt8xx/bttv-driver.c:2679 bttv_s_fbuf() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] mantis: remove dead codeMauro Carvalho Chehab
drivers/media/pci/mantis/mantis_cards.c:229 mantis_pci_probe() info: ignoring unreachable code. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] zoran: fix indentMauro Carvalho Chehab
As reported by smatch: drivers/media/pci/zoran/zoran_device.c:1594 zoran_init_hardware() warn: inconsistent indenting Fix indent. While here, fix CodingStyle and remove dead code, as it can always be recovered from git logs. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] ivtv: avoid going past input/audio arrayMauro Carvalho Chehab
As reported by smatch: drivers/media/pci/ivtv/ivtv-driver.c:832 ivtv_init_struct2() error: buffer overflow 'itv->card->video_inputs' 6 <= 6 That happens because nof_inputs and nof_audio_inputs can be initialized as IVTV_CARD_MAX_VIDEO_INPUTS, instead of IVTV_CARD_MAX_VIDEO_INPUTS - 1. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] saa7164: Check if dev is NULL before dereferencing itMauro Carvalho Chehab
As reported by smatch: drivers/media/pci/saa7164/saa7164-core.c:631 saa7164_irq() warn: variable dereferenced before check 'dev' (see line 621) Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>