summaryrefslogtreecommitdiff
path: root/drivers/media/pci
AgeCommit message (Collapse)Author
2014-05-06media: saa7134: fix WARN_ON during resumeHans Verkuil
commit 30d652823de5fd7907d40e969a2d8e23938d8d03 upstream. Do not attempt to reload the tuner modules when resuming after a suspend. This triggers a WARN_ON in kernel/kmod.c:148 __request_module. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=69581. This has always been wrong, but it was never noticed until the WARN_ON was added in 3.9. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-31media: cx18: check for allocation failure in cx18_read_eeprom()Dan Carpenter
commit e351bf25fa373a3de0be2141b962c5c3c27006a2 upstream. It upsets static checkers when we don't check for allocation failure. I moved the memset() of "tv" earlier so we don't use uninitialized data on error. Fixes: 1d212cf0c2d8 ('[media] cx18: struct i2c_client is too big for stack') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20media: bttv: don't setup the controls if there are no video devicesHans Verkuil
commit f8e1b699a5504a2da05834c7cfdddb125a8ce088 upstream. The no_video flag was checked in all other cases except one. Calling v4l2_ctrl_handler_setup() if no_video is 1 will crash. This wasn't noticed before since there are only two card types that set no_video to 1, so this type of hardware is quite rare. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Lorenz Röhrl <sheepshit@gmx.de> Tested-by: Lorenz Röhrl <sheepshit@gmx.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-20media: saa7164: fix return value check in saa7164_initdev()Wei Yongjun
commit 89f4d45b2752df5d222b5f63919ce59e2d8afaf4 upstream. In case of error, the function kthread_run() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-04media: cx23885: Fix TeVii S471 regression since introduction of ts2020Johannes Koch
commit b43ea8068d2090cb1e44632c8a938ab40d2c7419 upstream. Patch to make TeVii S471 cards use the ts2020 tuner, since ds3000 driver no longer contains tuning code. Signed-off-by: Johannes Koch <johannes@ortsraum.de> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-04media: cx18: struct i2c_client is too big for stackMauro Carvalho Chehab
commit 1d212cf0c2d89adf3d0a6d62d729076f49f087dc upstream. drivers/media/pci/cx18/cx18-driver.c: In function 'cx18_read_eeprom': drivers/media/pci/cx18/cx18-driver.c:357:1: warning: the frame size of 1072 bytes is larger than 1024 bytes [-Wframe-larger-than=] That happens because the routine allocates 256 bytes for an eeprom buffer, plus the size of struct i2c_client, with is big. Change the logic to dynamically allocate/deallocate space for struct i2c_client, instead of using the stack. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-04media: cimax2: Don't use dynamic static allocationMauro Carvalho Chehab
commit 278ba83a3a1932805be726bdd7dfb3156286d33a upstream. Dynamic static allocation is evil, as Kernel stack is too low, and compilation complains about it on some archs: drivers/media/pci/cx23885/cimax2.c:149:1: warning: 'netup_write_i2c' uses dynamic stack allocation [enabled by default] Instead, let's enforce a limit for the buffer. Considering that I2C transfers are generally limited, and that devices used on USB has a max data length of 64 bytes for the control URBs. So, it seem safe to use 64 bytes as the hard limit for all those devices. On most cases, the limit is a way lower than that, but this limit is small enough to not affect the Kernel stack, and it is a no brain limit, as using smaller ones would require to either carefully each driver or to take a look on each datasheet. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-04media: av7110_hw: Don't use dynamic static allocationMauro Carvalho Chehab
commit 5bf30b3bc4ff80ef71a733a1f459cca4fa507892 upstream. Dynamic static allocation is evil, as Kernel stack is too low, and compilation complains about it on some archs: drivers/media/pci/ttpci/av7110_hw.c:510:1: warning: 'av7110_fw_cmd' uses dynamic stack allocation [enabled by default] Instead, let's enforce a limit for the buffer. In the specific case of this driver, the maximum fw command size is 6 + 2, as checked using: $ git grep -A1 av7110_fw_cmd drivers/media/pci/ttpci/ So, use 8 for the buffer size. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-01Properly handle tristate dependencies on USB/PCI menusMauro Carvalho Chehab
commit 5077ac3b8108007f4a2b4589f2d373cf55453206 upstream. As USB/PCI/MEDIA_SUPPORT dependencies can be tristate, we can't simply make the bool menu to be dependent on it. Everything below the menu should also depend on it, otherwise, we risk to allow building them with 'y', while only 'm' would be supported. So, add an IF just before everything below, in order to avoid such risks. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-28media: saa7134: Fix unlocked snd_pcm_stop() callTakashi Iwai
commit e6355ad7b1c6f70e2f48ae159f5658b441ccff95 upstream. snd_pcm_stop() must be called in the PCM substream lock context. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-18Merge 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: "Series of fixes for 3.10. There are some usual driver fixes (mostly on s5p/exynos playform drivers), plus some fixes at V4L2 core" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (40 commits) [media] soc_camera: error dev remove and v4l2 call [media] sh_veu: fix the buffer size calculation [media] sh_veu: keep power supply until the m2m context is released [media] sh_veu: invoke v4l2_m2m_job_finish() even if a job has been aborted [media] v4l2-ioctl: don't print the clips list [media] v4l2-ctrls: V4L2_CTRL_CLASS_FM_RX controls are also valid radio controls [media] cx88: fix NULL pointer dereference [media] DocBook/media/v4l: update version number [media] exynos4-is: Remove "sysreg" clock handling [media] exynos4-is: Fix reported colorspace at FIMC-IS-ISP subdev [media] exynos4-is: Ensure fimc-is clocks are not enabled until properly configured [media] exynos4-is: Prevent NULL pointer dereference when firmware isn't loaded [media] s5p-mfc: Add NULL check for allocated buffer [media] s5p-mfc: added missing end-of-lines in debug messages [media] s5p-mfc: v4l2 controls setup routine moved to initialization code [media] s5p-mfc: separate encoder parameters for h264 and mpeg4 [media] s5p-mfc: Remove special clock usage in driver [media] s5p-mfc: Remove unused s5p_mfc_get_decoded_status_v6() function [media] v4l2: mem2mem: save irq flags correctly [media] coda: v4l2-compliance fix: add VIDIOC_CREATE_BUFS support ...
2013-06-08[media] cx88: fix NULL pointer dereferenceHans Verkuil
This fixes a NULL pointer deference when loading the cx88_dvb module for a Hauppauge HVR4000. The bugzilla bug report is here: https://bugzilla.kernel.org/show_bug.cgi?id=56271 The cause is that the wm8775 is optional, so even though the board info says there is one, it doesn't have to be there. Checking whether the module was actually loaded is much safer. Note that this driver is quite buggy when it comes to unloading and reloading modules. Unloading cx8800 and reloading it again will still cause a crash, most likely because either the i2c bus isn't unloaded at the right time and/or the v4l2_device_unregister isn't called at the right time. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Sebastian Frei <sebastian@familie-frei.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-05-31zoran: racy refcount handling in vm_ops ->open()/->close()Al Viro
worse, we lock ->resource_lock too late when we are destroying the final clonal VMA; the check for lack of other mappings of the same opened file can race with mmap(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-05-02Merge branch 'i2c/for-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c changes from Wolfram Sang: - an arbitration driver. While the driver is quite simple, it caused discussion if we need additional arbitration on top of the one specified in the I2C standard. Conclusion is that I accept a few generic mechanisms, but not very specific ones. - the core lost the detach_adapter() call. It has no users anymore and was in the way for other cleanups. attach_adapter() is sadly still there since there are users waiting to be converted. - the core gained a bus recovery infrastructure. I2C defines a way to recover if the data line is stalled. This mechanism is now in the core and drivers can now pass some data to make use of it. - bigger driver cleanups for designware, s3c2410 - removing superfluous refcounting from drivers - removing Ben Dooks as second maintainer due to inactivity. Thanks for all your work so far, Ben! - bugfixes, feature additions, devicetree fixups, simplifications... * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (38 commits) i2c: xiic: must always write 16-bit words to TX_FIFO i2c: octeon: use HZ in timeout value i2c: octeon: Fix i2c fail problem when a process is terminated by a signal i2c: designware-pci: drop superfluous {get|put}_device i2c: designware-plat: drop superfluous {get|put}_device i2c: davinci: drop superfluous {get|put}_device MAINTAINERS: Ben Dooks is inactive regarding I2C i2c: mux: Add i2c-arb-gpio-challenge 'mux' driver i2c: at91: convert to dma_request_slave_channel_compat() i2c: mxs: do error checking and handling in PIO mode i2c: mxs: remove races in PIO code i2c-designware: switch to use runtime PM autosuspend i2c-designware: use usleep_range() in the busy-loop i2c-designware: enable/disable the controller properly i2c-designware: use dynamic adapter numbering on Lynxpoint i2c-designware-pci: use managed functions pcim_* and devm_* i2c-designware-pci: use dev_err() instead of printk() i2c-designware: move to managed functions (devm_*) i2c: remove CONFIG_HOTPLUG ifdefs i2c: s3c2410: Add SMBus emulation for block read ...
2013-05-01Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull VFS updates from Al Viro, Misc cleanups all over the place, mainly wrt /proc interfaces (switch create_proc_entry to proc_create(), get rid of the deprecated create_proc_read_entry() in favor of using proc_create_data() and seq_file etc). 7kloc removed. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits) don't bother with deferred freeing of fdtables proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h proc: Make the PROC_I() and PDE() macros internal to procfs proc: Supply a function to remove a proc entry by PDE take cgroup_open() and cpuset_open() to fs/proc/base.c ppc: Clean up scanlog ppc: Clean up rtas_flash driver somewhat hostap: proc: Use remove_proc_subtree() drm: proc: Use remove_proc_subtree() drm: proc: Use minor->index to label things, not PDE->name drm: Constify drm_proc_list[] zoran: Don't print proc_dir_entry data in debug reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show() proc: Supply an accessor for getting the data from a PDE's parent airo: Use remove_proc_subtree() rtl8192u: Don't need to save device proc dir PDE rtl8187se: Use a dir under /proc/net/r8180/ proc: Add proc_mkdir_data() proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h} proc: Move PDE_NET() to fs/proc/proc_net.c ...
2013-05-01zoran: Don't print proc_dir_entry data in debugDavid Howells
Don't print proc_dir_entry data in debug as we're soon to have no direct access to the contents of the PDE. Print what was put in there instead. Signed-off-by: David Howells <dhowells@redhat.com> cc: mjpeg-users@lists.sourceforge.net cc: linux-media@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-05-01proc: Supply PDE attribute setting accessor functionsDavid Howells
Supply accessor functions to set attributes in proc_dir_entry structs. The following are supplied: proc_set_size() and proc_set_user(). Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> cc: linuxppc-dev@lists.ozlabs.org cc: linux-media@vger.kernel.org cc: netdev@vger.kernel.org cc: linux-wireless@vger.kernel.org cc: linux-pci@vger.kernel.org cc: netfilter-devel@vger.kernel.org cc: alsa-devel@alsa-project.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-04-30Merge branch 'v4l_for_linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media update from Mauro Carvalho Chehab: - OF documentation and patches at core and drivers, to be used by for embedded media systems - some I2C drivers used on go7007 were rewritten/promoted from staging: sony-btf-mpx, tw2804, tw9903, tw9906, wis-ov7640, wis-uda1342 - add fimc-is driver (Exynos) - add a new radio driver: radio-si476x - add a two new tuners: r820t and tuner_it913x - split camera code on em28xx driver and add more models - the cypress firmware load is used outside dvb usb drivers. So, move it to a common directory to make easier to re-use it - siano media driver updated to work with sms2270 devices - several work done in order to promote go7007 and solo6x1x out of staging (still, there are some pending issues) - several API compliance fixes at v4l2 drivers that don't behave as expected - as usual, lots of driver fixes, improvements, cleanups and new device addition at the existing drivers. * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (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 ...
2013-04-30Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "Usual stuff, mostly comment fixes, typo fixes, printk fixes and small code cleanups" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (45 commits) mm: Convert print_symbol to %pSR gfs2: Convert print_symbol to %pSR m32r: Convert print_symbol to %pSR iostats.txt: add easy-to-find description for field 6 x86 cmpxchg.h: fix wrong comment treewide: Fix typo in printk and comments doc: devicetree: Fix various typos docbook: fix 8250 naming in device-drivers pata_pdc2027x: Fix compiler warning treewide: Fix typo in printks mei: Fix comments in drivers/misc/mei treewide: Fix typos in kernel messages pm44xx: Fix comment for "CONFIG_CPU_IDLE" doc: Fix typo "CONFIG_CGROUP_CGROUP_MEMCG_SWAP" mmzone: correct "pags" to "pages" in comment. kernel-parameters: remove outdated 'noresidual' parameter Remove spurious _H suffixes from ifdef comments sound: Remove stray pluses from Kconfig file radio-shark: Fix printk "CONFIG_LED_CLASS" doc: put proper reference to CONFIG_MODULE_SIG_ENFORCE ...
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-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-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-22[media] cx88: Fix unsafe locking in suspend-resumeAlexey Khoroshilov
Legacy PCI suspend-resume handlers are called with interrupts enabled. But cx8800_suspend/cx8800_resume and cx8802_suspend_common/cx8802_resume_common use spin_lock/spin_unlock functions to acquire dev->slock, while the same lock is acquired in the corresponding irq-handlers: cx8800_irq and cx8802_irq. That means a deadlock is possible if an interrupt happens while suspend or resume owns the lock. The patch replaces spin_lock/spin_unlock with spin_lock_irqsave/spin_unlock_irqrestore. Found by Linux Driver Verification project (linuxtesting.org). [mchehab@redhat.com: Fix CodingStyle] Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] sta2x11_vip: Fix compilation if I2C is not setMauro Carvalho Chehab
From Fengguang Wu <fengguang.wu@intel.com>: > drivers/media/pci/sta2x11/sta2x11_vip.c: In function 'sta2x11_vip_init_one': > drivers/media/pci/sta2x11/sta2x11_vip.c:1314:2: error: implicit declaration of function 'i2c_get_adapter' [-Werror=implicit-function-declaration] > drivers/media/pci/sta2x11/sta2x11_vip.c:1314:15: warning: assignment makes pointer from integer without a cast [enabled by default] > drivers/media/pci/sta2x11/sta2x11_vip.c:1330:2: error: implicit declaration of function 'i2c_put_adapter' [-Werror=implicit-function-declaration] And also: > warning: (STA2X11_VIP) selects VIDEO_ADV7180 which has unmet direct dependencies (MEDIA_SUPPORT && VIDEO_V4L2 && I2C) > drivers/media/i2c/adv7180.c: In function '__adv7180_status': > drivers/media/i2c/adv7180.c:194:2: error: implicit declaration of function 'i2c_smbus_read_byte_data' [-Werror=implicit-function-declaration] > drivers/media/i2c/adv7180.c: In function 'adv7180_s_routing': > drivers/media/i2c/adv7180.c:251:2: error: implicit declaration of function 'i2c_smbus_write_byte_data' [-Werror=implicit-function-declaration] > drivers/media/i2c/adv7180.c: In function 'adv7180_probe': > drivers/media/i2c/adv7180.c:551:2: error: implicit declaration of function 'i2c_check_functionality' [-Werror=implicit-function-declaration] > drivers/media/i2c/adv7180.c:554:2: error: implicit declaration of function 'i2c_adapter_id' [-Werror=implicit-function-declaration] > drivers/media/i2c/adv7180.c: At top level: > drivers/media/i2c/adv7180.c:663:1: warning: data definition has no type or storage class [enabled by default] > drivers/media/i2c/adv7180.c:663:1: warning: type defaults to 'int' in declaration of 'module_i2c_driver' [-Wimplicit-int] > drivers/media/i2c/adv7180.c:663:1: warning: parameter names (without types) in function declaration [enabled by default] > drivers/media/i2c/adv7180.c:649:26: warning: 'adv7180_driver' defined but not used [-Wunused-variable] This is due to the lack of I2C support: ... > CONFIG_I2C is not set ... So, Make sure that sta2x11_vip depends on I2C. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] zoran: Don't print proc_dir_entry data in debug [RFC]David Howells
Don't print proc_dir_entry data in debug as we're soon to have no direct access to the contents of the PDE. Print what was put in there instead. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: remove cx25821-audio-upstream.c from the MakefileHans Verkuil
The audio output is currently not used as this should be rewritten as an alsa driver. For the time being remove this source from the Makefile. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: replace custom ioctls with write()Hans Verkuil
Ideally this should be implemented with vb2, but it'll do for now. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: drop cx25821-video-upstream-ch2.c/hHans Verkuil
cx25821-video-upstream_ch2.c/h is practically identical to cx25821-video-upstream.c/h so add support for ch2 into cx25821-video-upstream.c instead. After this we can replace the custom ioctls with a proper write() interface. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: add output format ioctlsHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: prepare querycap for output supportHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: group all fmt functions togetherHans Verkuil
No other changes, just function reordering. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: setup output nodes correctlyHans Verkuil
Drop the custom ioctls and enable the video output nodes again, this time using standard ioctls. The next step will be to provide a proper write() interface. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: remove references to subdevices that aren't thereHans Verkuil
This driver does not have subdevices, so why call subdev ops? After removing that it became apparent that only Composite is supported as input, so remove also any reference to other inputs. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: remove custom ioctls that duplicate v4l2 ioctlsHans Verkuil
No idea why these custom ioctls exist: they have perfectly normal v4l2 counterparts which are already implemented. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: g/s/try/enum_fmt related fixes and cleanupsHans Verkuil
- fill in colorspace - zero priv - delete unsupported formats - fix field handling - s_std should update width/height - proper mapping of width/height to valid resolutions Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: switch to v4l2_fh, add event and prio handlingHans Verkuil
It is now possible to remove cx25821_fh and replace it with v4l2_fh, which in turn makes event handling and core prio handling possible. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: replace resource management functions with fh ownershipHans Verkuil
Just remember which filehandle is streaming instead of using complicated resource masks. After this patch we can replace cx25821_fh with v4l2_fh. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: move vidq from cx25821_fh to cx25821_channelHans Verkuil
This is not a per-filehandle object, it's a per-channel object. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: remove 'type' field from cx25821_fhHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: use core lockingHans Verkuil
This allows us to replace .ioctl with .unlocked_ioctl. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: remove unnecessary debug messagesHans Verkuil
The v4l2 core already has support for debugging ioctls/file operations. No need to do that again. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: remove TRUE/FALSE/STATUS_(UN)SUCCESSFUL definesHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: convert to the control frameworkHans Verkuil
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: embed video_device, clean up some kernel log spamHans Verkuil
Embed the video_device struct instead of allocating it. Remove some of the annoying and ugly kernel messages shown during loading and unloading of the module. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: remove bogus dependenciesHans Verkuil
This driver doesn't use DVB, RC, cx25840 or tveeprom. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: remove cropping ioctlsHans Verkuil
This driver does not implement cropping, so remove the cropping ioctls. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: make lots of externals staticHans Verkuil
A lot of functions and variables were external when they really can be declared as static. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-16[media] cx25821: s_input didn't check for invalid inputHans Verkuil
The s_input implementation allowed input 1 even if that didn't exist. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>