aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-05-21[media] vpfe-capture.c: remove unused label probe_free_lockHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-21[media] DocBook: media: update codec section, drop obsolete 'suspended' stateHans Verkuil
The Codec section in the V4L2 specification was marked as 'suspended', even though codec support has been around for quite some time. Update this section, explaining a bit about memory-to-memory devices and pointing to the MPEG controls section. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-21[media] radio-si476x: depend on SND_SOCArnd Bergmann
It is not possible to select SND_SOC_SI476X if we have not also enabled SND_SOC. warning: (RADIO_SI476X) selects SND_SOC_SI476X which has unmet direct dependencies (SOUND && !M68K && !UML && SND && SND_SOC) Signed-off-by: Arnd Bergmann <arnd@arndb.de> [hans.verkuil@cisco.com: fixed wrong driver name in subject] Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-21[media] v4l2: SI476X MFD - Do not use binary constantsGeert Uytterhoeven
Gcc < 4.3 doesn't understand binary constanrs (0b*): drivers/media/radio/radio-si476x.c:862:20: error: invalid suffix "b10000000" on integer constant Hence use a hexadecimal constant (0x*) instead. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-21[media] davinci: vpfe: fix error return code in vpfe_probe()Wei Yongjun
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-21[media] davinci: vpfe: fix error path in probeLad, Prabhakar
The error path on failure was calling mutex_unlock(), but there was no actuall call before for mutex_lock(). This patch fixes this issue by pointing it to proper go label. Reported-by: Jose Pablo Carballo <jose.carballo@ridgerun.com> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-21[media] media: davinci: vpbe: fix layer availability for NV12 formatLad, Prabhakar
For NV12 format, even if display data is single image, both VIDWIN0 and VIDWIN1 parameters must be used. The start address of Y data plane and C data plane is configured in VIDEOWIN0ADH/L and VIDEOWIN1ADH/L respectively. cuurently only one layer was requested, which is suffice for yuv422, but for yuv420(NV12) two layers are required and fix the same by requesting for other layer if pix fmt is NV12 during set_fmt. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-07[media] gspca-sonixb: Adjust hstart on sn9c103 + pas202Hans de Goede
For some unknown reason we need to increase hstart by 1 on when using the PAS202 on the sn9c103 (versus on the sn9c102), otherwise we get the wrong colors, due to shifting of the bayer pattern. Reported-by: Patrizio Bassi <patrizio.bassi@gmail.com> Tested-by: Patrizio Bassi <patrizio.bassi@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-07[media] pwc: Fix comment wrt lock orderingHans de Goede
With all the changes to handle the locking in the v4l2-core rather then at the driver level, the order in which the 2 pwc locks need to be taken has changed, update the comment in the header file to correctly reflect this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-30Merge branch 'devel-for-v3.10' into v4l_for_linusMauro Carvalho Chehab
* patchwork: (831 commits) [media] cx88: make core less verbose [media] em28xx: fix oops at em28xx_dvb_bus_ctrl() [media] s5c73m3: fix indentation of the help section in Kconfig [media] cx25821-alsa: get rid of a __must_check warning [media] cx25821-video: declare cx25821_vidioc_s_std as static [media] cx25821-video: remove maxw from cx25821_vidioc_try_fmt_vid_cap [media] r820t: Remove a warning for an unused value [media] dib0090: Fix a warning at dib0090_set_EFUSE [media] dib8000: fix a warning [media] dib8000: Fix sub-channel range [media] dib8000: store dtv_property_cache in a temp var [media] dib8000: warning fix: declare internal functions as static [media] r820t: quiet gcc warning on n_ring [media] r820t: memory leak in release() [media] r820t: precendence bug in r820t_xtal_check() [media] videodev2.h: Remove the unused old V4L1 buffer types [media] anysee: Grammar s/report the/report to/ [media] anysee: Initialize ret = 0 in anysee_frontend_attach() [media] media: videobuf2: fix the length check for mmap [media] em28xx: save isoc endpoint number for DVB only if endpoint has alt settings with xMaxPacketSize != 0 ... Conflicts: drivers/media/pci/cx25821/cx25821-video.c drivers/media/platform/Kconfig
2013-04-30Merge tag 'v3.9' into v4l_for_linusMauro Carvalho Chehab
Linux 3.9 * tag 'v3.9': (1099 commits) Linux 3.9 vm: add no-mmu vm_iomap_memory() stub efivars: only check for duplicates on the registered list TTY: fix atime/mtime regression aio: fix possible invalid memory access when DEBUG is enabled parisc: use spin_lock_irqsave/spin_unlock_irqrestore for PTE updates parisc: disable -mlong-calls compiler option for kernel modules parisc: uaccess: fix compiler warnings caused by __put_user casting parisc: Change kunmap macro to static inline function parisc: Provide __ucmpdi2 to resolve undefined references in 32 bit builds. sparc64: Fix missing put_cpu_var() in tlb_batch_add_one() when not batching. Revert "gpio: pxa: set initcall level to module init" efi: Check EFI revision in setup_efi_vars x86, efi: Fix a build warning Revert "MIPS: page.h: Provide more readable definition for PAGE_MASK." kernel/hz.bc: ignore. Linux 3.9-rc8 events: Protect access via task_subsys_state_check() net: fix incorrect credentials passing x86, microcode: Verify the family before dispatching microcode patching ...
2013-04-28Linux 3.9tracking-linux-3.x.y-lsk-20130505.0Linus Torvalds
2013-04-28[media] cx88: make core less verboseMauro Carvalho Chehab
Along the time, several debug messages were added at cx88-cards. While those are still useful to track some troubles with tuners, they're too verbose: [ 5768.281801] cx88[0]: Calling XC2028/3028 callback [ 5768.287388] cx88[0]: Calling XC2028/3028 callback [ 5768.292575] cx88[0]: Calling XC2028/3028 callback [ 5768.299408] cx88[0]: Calling XC2028/3028 callback [ 5768.306244] cx88[0]: Calling XC2028/3028 callback ... and, most of the time, useless. So, disable them, except if core_debug modprobe parameter is used. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-28[media] em28xx: fix oops at em28xx_dvb_bus_ctrl()Mauro Carvalho Chehab
em28xx is oopsing with some DVB devices: [10856.061884] general protection fault: 0000 [#1] SMP [10856.067041] Modules linked in: rc_hauppauge em28xx_rc xc5000 drxk em28xx_dvb dvb_core em28xx videobuf2_vmalloc videobuf2_memops videobuf2_core rc_pixelview_new tuner_xc2028 tuner cx8800 cx88xx tveeprom btcx_risc videobuf_dma_sg videobuf_core rc_core v4l2_common videodev ebtable_nat ebtables nf_conntrack_ipv4 nf_defrag_ipv4 xt_CHECKSUM be2iscsi iscsi_boot_sysfs iptable_mangle bnx2i cnic uio cxgb4i cxgb4 tun bridge cxgb3i cxgb3 stp ip6t_REJECT mdio libcxgbi nf_conntrack_ipv6 llc nf_defrag_ipv6 ib_iser rdma_cm ib_addr xt_conntrack iw_cm ib_cm ib_sa nf_conntrack ib_mad ib_core bnep bluetooth iscsi_tcp libiscsi_tcp ip6table_filter libiscsi ip6_tables scsi_transport_iscsi xfs libcrc32c snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm tg3 snd_page_alloc snd_timer [10856.139176] snd ptp iTCO_wdt soundcore pps_core iTCO_vendor_support lpc_ich mfd_core coretemp nfsd hp_wmi crc32c_intel microcode serio_raw rfkill sparse_keymap nfs_acl lockd sunrpc kvm_intel kvm uinput binfmt_misc firewire_ohci nouveau mxm_wmi i2c_algo_bit drm_kms_helper firewire_core crc_itu_t ttm drm i2c_core wmi [last unloaded: dib0070] [10856.168969] CPU 1 [10856.170799] Pid: 13606, comm: dvbv5-zap Not tainted 3.9.0-rc5+ #26 Hewlett-Packard HP Z400 Workstation/0AE4h [10856.181187] RIP: 0010:[<ffffffffa0459e47>] [<ffffffffa0459e47>] em28xx_write_regs_req+0x37/0x1c0 [em28xx] [10856.191028] RSP: 0018:ffff880118401a58 EFLAGS: 00010282 [10856.196533] RAX: 00020000012d0000 RBX: ffff88010804aec8 RCX: ffff880118401b14 [10856.203852] RDX: 0000000000000048 RSI: 0000000000000000 RDI: ffff88010804aec8 [10856.211174] RBP: ffff880118401ac8 R08: 0000000000000001 R09: 0000000000000000 [10856.218496] R10: 0000000000000000 R11: 0000000000000006 R12: 0000000000000048 [10856.226026] R13: ffff880118401b14 R14: ffff88011752b258 R15: ffff88011752b258 [10856.233352] FS: 00007f26636d2740(0000) GS:ffff88011fc20000(0000) knlGS:0000000000000000 [10856.241626] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [10856.247565] CR2: 00007f2663716e20 CR3: 00000000c7eb1000 CR4: 00000000000007e0 [10856.254889] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [10856.262215] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 [10856.269542] Process dvbv5-zap (pid: 13606, threadinfo ffff880118400000, task ffff8800cd625d40) [10856.278340] Stack: [10856.280564] ffff88011ffe8de8 0000000000000002 0000000000000000 ffff88011ffe9b00 [10856.288191] ffff880118401b14 00ff88011ffe9b08 ffff880100000048 ffffffff8112a52a [10856.295893] 0000000000000001 ffff88010804aec8 0000000000000048 ffff880118401b14 [10856.303521] Call Trace: [10856.306182] [<ffffffff8112a52a>] ? __alloc_pages_nodemask+0x15a/0x960 [10856.312912] [<ffffffffa045a002>] em28xx_write_regs+0x32/0xa0 [em28xx] [10856.319638] [<ffffffffa045a221>] em28xx_write_reg+0x21/0x30 [em28xx] [10856.326279] [<ffffffffa045a2cc>] em28xx_gpio_set+0x9c/0x100 [em28xx] [10856.332919] [<ffffffffa045a3ac>] em28xx_set_mode+0x7c/0x80 [em28xx] [10856.339472] [<ffffffffa03ef032>] em28xx_dvb_bus_ctrl+0x32/0x40 [em28xx_dvb] This is caused by commit c7a45e5b4f8c2f96cd242ae1b1c06e7fb19a08d0, that added support for two I2C buses. A partial fix was applied at 3de09fbbfaa521e68675bd30cfece252c4856600, but it doesn't cover all cases, as the DVB core fills fe->dvb->priv with adapter->priv. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-27Merge tag 'fixes-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fix from Olof Johansson: "A late-arriving fix for musb on OMAP4, resolving an issue where the musb IP won't be clocked and thus not functional. Small in scope, most of the lines changed is a longish comment." * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: OMAP4: hwmod data: make 'ocp2scp_usb_phy_phy_48m" as the main clock
2013-04-27vm: add no-mmu vm_iomap_memory() stubLinus Torvalds
I think we could just move the full vm_iomap_memory() function into util.h or similar, but I didn't get any reply from anybody actually using nommu even to this trivial patch, so I'm not going to touch it any more than required. Here's the fairly minimal stub to make the nommu case at least potentially work. It doesn't seem like anybody cares, though. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-27Merge branch 'perf-urgent-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Ingo Molnar: "This fix adds missing RCU read protection" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: events: Protect access via task_subsys_state_check()
2013-04-26Merge tag 'omap-for-v3.9-rc6/fixes-signed' of ↵Olof Johansson
git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes From Tony Lindgren: One MUSB regression fix that I forgot to send earlier. Without this MUSB no longer works on omap4 based devices. * tag 'omap-for-v3.9-rc6/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP4: hwmod data: make 'ocp2scp_usb_phy_phy_48m" as the main clock Signed-off-by: Olof Johansson <olof@lixom.net>
2013-04-26Merge branch 'v4l_for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Two driver fixes. One avoids reading any file at a system with a cx25821 board (fortunately, this is not a common device). The other one prevents reading after a buffer with ISDB-T devices based on mb86a20s." * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] cx25821: do not expose broken video output streams [media] mb86a20s: Fix estimate_rate setting
2013-04-26Merge branch 'fixes-3.9-late' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull late parisc fixes from Helge Deller: "I know it's *very* late in the 3.9 release cycle, but since there aren't that many people testing the parisc linux kernel, a few (for our port) critical issues just showed up a few days back for the first time. What's in it? - add missing __ucmpdi2 symbol, which is required for btrfs on 32bit kernel. - change kunmap() macro to static inline function. This fixes a debian/gcc-4.4 build error. - add locking when doing PTE updates. This fixes random userspace crashes. - disable (optional) -mlong-calls compiler option for modules, else modules can't be loaded at runtime. - a smart patch by Will Deacon which fixes 64bit put_user() warnings on 32bit kernel." * 'fixes-3.9-late' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: use spin_lock_irqsave/spin_unlock_irqrestore for PTE updates parisc: disable -mlong-calls compiler option for kernel modules parisc: uaccess: fix compiler warnings caused by __put_user casting parisc: Change kunmap macro to static inline function parisc: Provide __ucmpdi2 to resolve undefined references in 32 bit builds.
2013-04-26efivars: only check for duplicates on the registered listMatt Fleming
variable_is_present() accesses '__efivars' directly, but when called via gsmi_init() Michel reports observing the following crash, BUG: unable to handle kernel NULL pointer dereference at (null) IP: variable_is_present+0x55/0x170 Call Trace: register_efivars+0x106/0x370 gsmi_init+0x2ad/0x3da do_one_initcall+0x3f/0x170 The reason for the crash is that '__efivars' hasn't been initialised nor has it been registered with register_efivars() by the time the google EFI SMI driver runs. The gsmi code uses its own struct efivars, and therefore, a different variable list. Fix the above crash by passing the registered struct efivars to variable_is_present(), so that we traverse the correct list. Reported-by: Michel Lespinasse <walken@google.com> Tested-by: Michel Lespinasse <walken@google.com> Cc: Mike Waychison <mikew@google.com> Cc: Matthew Garrett <matthew.garrett@nebula.com> Cc: Seiji Aguchi <seiji.aguchi@hds.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-26TTY: fix atime/mtime regressionJiri Slaby
In commit b0de59b5733d ("TTY: do not update atime/mtime on read/write") we removed timestamps from tty inodes to fix a security issue and waited if something breaks. Well, 'w', the utility to find out logged users and their inactivity time broke. It shows that users are inactive since the time they logged in. To revert to the old behaviour while still preventing attackers to guess the password length, we update the timestamps in one-minute intervals by this patch. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-26aio: fix possible invalid memory access when DEBUG is enabledZhao Hongjiang
dprintk() shouldn't access @ring after it's unmapped. Signed-off-by: Zhao Hongjiang <zhaohongjiang@huawei.com> Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-04-25Merge tag 'efi-urgent' into x86/urgentH. Peter Anvin
* The EFI variable anti-bricking algorithm merged in -rc8 broke booting on some Apple machines because they implement EFI spec 1.10, which doesn't provide a QueryVariableInfo() runtime function and the logic used to check for the existence of that function was insufficient. Fix from Josh Boyer. * The anti-bricking algorithm also introduced a compiler warning on 32-bit. Fix from Borislav Petkov. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-04-25parisc: use spin_lock_irqsave/spin_unlock_irqrestore for PTE updatesJohn David Anglin
User applications running on SMP kernels have long suffered from instability and random segmentation faults. This patch improves the situation although there is more work to be done. One of the problems is the various routines in pgtable.h that update page table entries use different locking mechanisms, or no lock at all (set_pte_at). This change modifies the routines to all use the same lock pa_dbit_lock. This lock is used for dirty bit updates in the interruption code. The patch also purges the TLB entries associated with the PTE to ensure that inconsistent values are not used after the page table entry is updated. The UP and SMP code are now identical. The change also includes a minor update to the purge_tlb_entries function in cache.c to improve its efficiency. Signed-off-by: John David Anglin <dave.anglin@bell.net> Cc: Helge Deller <deller@gmx.de> Signed-off-by: Helge Deller <deller@gmx.de>
2013-04-25parisc: disable -mlong-calls compiler option for kernel modulesHelge Deller
CONFIG_MLONGCALLS was introduced in commit ec758f98328da3eb933a25dc7a2eed01ef44d849 to overcome linker issues when linking huge linux kernels, e.g. with many modules linked in. But in the kernel module loader there is no support yet for the new relocation types, which is why modules built with -mlong-calls can't be loaded. Furthermore, for modules long calls are not really necessary, since we already use stub sections which resolve long distance calls. So, let's just disable this compiler option when compiling kernel modules. Signed-off-by: Helge Deller <deller@gmx.de>
2013-04-25parisc: uaccess: fix compiler warnings caused by __put_user castingWill Deacon
When targetting 32-bit processors, __put_user emits a pair of stw instructions for the 8-byte case. If the type of __val is a pointer, the marshalling code casts it to the wider integer type of u64, resulting in the following compiler warnings: kernel/signal.c: In function 'copy_siginfo_to_user': kernel/signal.c:2752:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] kernel/signal.c:2752:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] [...] This patch fixes the warnings by removing the marshalling code and using the correct output modifiers in the __put_{user,kernel}_asm64 macros so that GCC will allocate the right registers without the need to extract the two words explicitly. Cc: Helge Deller <deller@gmx.de> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Helge Deller <deller@gmx.de>
2013-04-25parisc: Change kunmap macro to static inline functionJohn David Anglin
Change kunmap macro to static inline function to fix build error compiling drivers/base/dma-buf.c. Without the change, the following error can occur: CC drivers/base/dma-buf.o drivers/base/dma-buf.c: In function 'dma_buf_kunmap': drivers/base/dma-buf.c:427:46: error: macro "kunmap" passed 3 arguments, but takes just 1 I believe parisc is the only arch to implement kunmap using a macro. Signed-off-by: John David Anglin <dave.anglin@bell.net> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> Cc: Helge Deller <deller@gmx.de> Signed-off-by: Helge Deller <deller@gmx.de>
2013-04-25parisc: Provide __ucmpdi2 to resolve undefined references in 32 bit builds.John David Anglin
The Debian experimental linux source package (3.8.5-1) build fails with the following errors: ... MODPOST 2016 modules ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined! ERROR: "__ucmpdi2" [drivers/md/dm-verity.ko] undefined! The attached patch resolves this problem. It is based on the s390 implementation of ucmpdi2.c. Signed-off-by: John David Anglin <dave.anglin@bell.net> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> Signed-off-by: Helge Deller <deller@gmx.de>
2013-04-25[media] s5c73m3: fix indentation of the help section in KconfigGianluca Gennari
The 'help' section of the Kconfig entry for this driver is missing an extra alignment. That seems to violate what's stated at: Documentation/kbuild/kconfig-language.txt Even if it works, the better is to add 2 extra spaces there, as this is the common practice and helps human reading of the file. Also, the way it is, it breaks backport trees. Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] cx25821-alsa: get rid of a __must_check warningMauro Carvalho Chehab
The hole reason for __must_check is to not ignore an error. However, a "ret" value is used at cx25821 just to avoid the Kernel compilation to compain about it. That, however, produces another warning (with W=1): drivers/media/pci/cx25821/cx25821-alsa.c: In function 'cx25821_audio_fini': drivers/media/pci/cx25821/cx25821-alsa.c:727:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] With the current implementation of driver_for_each_device() and cx25821_alsa_exit_callback(), there's actually just one very unlikely condition where it will currently produce an error: if driver_find() returns NULL. Ok, there's not much that can be done, as it is on a driver's function that returns void, but it can at least print some message if the error happens. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] cx25821-video: declare cx25821_vidioc_s_std as staticMauro Carvalho Chehab
Fixes the following warning: drivers/media/pci/cx25821/cx25821-video.c: At top level: drivers/media/pci/cx25821/cx25821-video.c:766:5: warning: no previous prototype for 'cx25821_vidioc_s_std' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] cx25821-video: remove maxw from cx25821_vidioc_try_fmt_vid_capMauro Carvalho Chehab
After cx25821-video cleanup, this var is not used anymore: drivers/media/pci/cx25821/cx25821-video.c: In function 'cx25821_vidioc_try_fmt_vid_cap': drivers/media/pci/cx25821/cx25821-video.c:591:15: warning: variable 'maxw' set but not used [-Wunused-but-set-variable] as the code now checks the max width as the default case for the range check. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] r820t: Remove a warning for an unused valueMauro Carvalho Chehab
Currently, the driver complains about the pre_detect var: drivers/media/tuners/r820t.c: In function 'r820t_sysfreq_sel': drivers/media/tuners/r820t.c:722:31: warning: variable 'pre_dect' set but not used [-Wunused-but-set-variable] While rtl8232 code comments it, perhaps some other driver may use. So, the better is to keep the code there, allowing to enable it via r820t config data. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] dib0090: Fix a warning at dib0090_set_EFUSEMauro Carvalho Chehab
The check if the values for c, h and n are within the range is always true, as, if one of this values is out of range, the previous "if" clauses will default to a value within the range. That fixes the following warning: drivers/media/dvb-frontends/dib0090.c: In function 'dib0090_set_EFUSE': drivers/media/dvb-frontends/dib0090.c:1545:5: warning: comparison is always true due to limited range of data type [-Wtype-limits] and makes the code easier to read. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] dib8000: fix a warningMauro Carvalho Chehab
drivers/media/dvb-frontends/dib8000.c: In function 'dib8000_wait_lock': drivers/media/dvb-frontends/dib8000.c:3972:1: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/media/dvb-frontends/dib8000.c:2419:6: note: 'value' was declared here Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] dib8000: Fix sub-channel rangeMauro Carvalho Chehab
isdbt_sb_subchannel is unsigned with 8 bits. So, it will never be -1. Instead, any value bigger than 13 is invalid. As is, the current code generates the following warnings: drivers/media/dvb-frontends/dib8000.c: In function 'dib8000_set_isdbt_common_channel': drivers/media/dvb-frontends/dib8000.c:2358:3: warning: comparison is always true due to limited range of data type [-Wtype-limits] drivers/media/dvb-frontends/dib8000.c: In function 'dib8000_tune': drivers/media/dvb-frontends/dib8000.c:3107:8: warning: comparison is always false due to limited range of data type [-Wtype-limits] drivers/media/dvb-frontends/dib8000.c:3153:9: warning: comparison is always false due to limited range of data type [-Wtype-limits] drivers/media/dvb-frontends/dib8000.c:3160:5: warning: comparison is always false It should also be noticed that ARIB STD-B31, item "3.15.6.8 Number of segments" at TMCC table defines the value 15 for unused segment, and 14 as reserved. So, better to change the check to consider any value bigger than 13 to mean that sub-channels should be disabled, fixing the warning and doing the right thing even if an invalid value is filled by userspace. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] dib8000: store dtv_property_cache in a temp varMauro Carvalho Chehab
dtv_property_cache is used on several places on very long lines. On all places it is used, a long list of struct reference is done. Instead of doing it, at the routines where it is used more than once, replace it by one temporary var. That may help the compiler to use a better code. It also makes easier to review the code, as the lines becomes closer to 80 columns, making them a way clearer to read. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] dib8000: warning fix: declare internal functions as staticMauro Carvalho Chehab
drivers/media/dvb-frontends/dib8000.c:2412:5: warning: no previous prototype for 'dib8000_wait_lock' [-Wmissing-prototypes] drivers/media/dvb-frontends/dib8000.c:2688:5: warning: no previous prototype for 'dib8000_get_symbol_duration' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] r820t: quiet gcc warning on n_ringFengguang Wu
drivers/media/tuners/r820t.c: In function 'r820t_imr': drivers/media/tuners/r820t.c:1871:8: warning: 'n_ring' may be used uninitialized in this function [-Wmaybe-uninitialized] Mauro: This is a FALSE POSITIVE: the loop will always return a value for n_ring, as the last test will fill it with 15, if the loop fails. Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] r820t: memory leak in release()Dan Carpenter
I've moved the kfree(fe->tuner_priv) one line earlier, otherwise it is a no-op. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] r820t: precendence bug in r820t_xtal_check()Dan Carpenter
The test as written is always false. It looks like the intent was to test that the bit was not set. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] videodev2.h: Remove the unused old V4L1 buffer typesMauro Carvalho Chehab
Those aren't used anywhere for a long time. Drop it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25Merge branch 'topic/cx25821' into patchworkMauro Carvalho Chehab
* topic/cx25821: (31 commits) [media] cx25821: remove cx25821-audio-upstream.c from the Makefile [media] cx25821: replace custom ioctls with write() [media] cx25821: drop cx25821-video-upstream-ch2.c/h [media] cx25821: add output format ioctls [media] cx25821: prepare querycap for output support [media] cx25821: group all fmt functions together [media] cx25821: setup output nodes correctly [media] cx25821: remove references to subdevices that aren't there [media] cx25821: remove custom ioctls that duplicate v4l2 ioctls [media] cx25821: g/s/try/enum_fmt related fixes and cleanups [media] cx25821: switch to v4l2_fh, add event and prio handling [media] cx25821: replace resource management functions with fh ownership [media] cx25821: move vidq from cx25821_fh to cx25821_channel [media] cx25821: remove 'type' field from cx25821_fh [media] cx25821: use core locking [media] cx25821: remove unnecessary debug messages [media] cx25821: remove TRUE/FALSE/STATUS_(UN)SUCCESSFUL defines [media] cx25821: convert to the control framework [media] cx25821: embed video_device, clean up some kernel log spam [media] cx25821: remove bogus dependencies ...
2013-04-25Merge branch 'topic/si476x' into patchworkMauro Carvalho Chehab
* topic/si476x: Revert "[media] mfd: Add chip properties handling code for SI476X MFD" Revert "[media] mfd: Add the main bulk of core driver for SI476x code" Revert "[media] mfd: Add commands abstraction layer for SI476X MFD" [media] v4l2: Add a V4L2 driver for SI476X MFD
2013-04-25Merge branch 'topic/r820t' into patchworkMauro Carvalho Chehab
* topic/r820t: (31 commits) [media] r820t: Don't divide the IF by two [media] r820t: disable auto gain/VGA setting [media] rtl2832: Fix IF calculus [media] r820t: put it into automatic gain mode [media] r820t: Fix hp_cor filter mask [media] r820t: fix PLL calculus [media] r820t: Don't put it in standby if not initialized yet [media] r820t: avoid rewrite all regs when not needed [media] r820t: Allow disabling IMR callibration [media] r820t: add a commented code for GPIO [media] r820t: add IMR calibrate code [media] r820t: proper initialize the PLL register [media] r820t: use usleep_range() [media] r820t: fix prefix of the r820t_read() function [media] r820t: split the function that read cached regs [media] r820t: better report signal strength [media] r820t: add support for diplexer [media] r820t: Show the read data in the bit-reversed order [media] r820t: use the second table for 7MHz [media] r820t: Invert bits for read ops ...
2013-04-25[media] anysee: Grammar s/report the/report to/Geert Uytterhoeven
[mchehab@redhat.com: Fix a merge conflict] Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] anysee: Initialize ret = 0 in anysee_frontend_attach()Geert Uytterhoeven
drivers/media/usb/dvb-usb-v2/anysee.c: In function ‘anysee_frontend_attach’: drivers/media/usb/dvb-usb-v2/anysee.c:641: warning: ‘ret’ may be used uninitialized in this function And gcc is right (see the ANYSEE_HW_507T case), so initialize ret to zero to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] media: videobuf2: fix the length check for mmapMauro Carvalho Chehab
Memory maps typically require that the buffer size to be page aligned. Currently, two memops drivers do such alignment internally, but videobuf-vmalloc doesn't. Also, the buffer overflow check doesn't take it into account. So, instead of doing it at each memops driver, enforce it at VB2 core. Reported-by: Prabhakar lad <prabhakar.csengg@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25[media] em28xx: save isoc endpoint number for DVB only if endpoint has alt ↵Frank Schaefer
settings with xMaxPacketSize != 0 X-Patchwork-Delegate: mchehab@redhat.com In addition to commit 72cc9ba3 "em28xx: ignore isoc DVB USB endpoints with wMaxPacketSize = 0 bytes for all alt settings" we should not save the endpoint number of the isoc DVB endpoint before it has been validated. While the current code works fine, dev->dvb_ep_isoc != 0 could be interpreted as indicator that the device provides DVB support. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>