summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'cross-rename' of ↵Linus Torvalds2014-04-0417-313/+643
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull renameat2 system call from Miklos Szeredi: "This adds a new syscall, renameat2(), which is the same as renameat() but with a flags argument. The purpose of extending rename is to add cross-rename, a symmetric variant of rename, which exchanges the two files. This allows interesting things, which were not possible before, for example atomically replacing a directory tree with a symlink, etc... This also allows overlayfs and friends to operate on whiteouts atomically. Andy Lutomirski also suggested a "noreplace" flag, which disables the overwriting behavior of rename. These two flags, RENAME_EXCHANGE and RENAME_NOREPLACE are only implemented for ext4 as an example and for testing" * 'cross-rename' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ext4: add cross rename support ext4: rename: split out helper functions ext4: rename: move EMLINK check up ext4: rename: create ext4_renament structure for local vars vfs: add cross-rename vfs: lock_two_nondirectories: allow directory args security: add flags to rename hooks vfs: add RENAME_NOREPLACE flag vfs: add renameat2 syscall vfs: rename: use common code for dir and non-dir vfs: rename: move d_move() up vfs: add d_is_dir()
| * ext4: add cross rename supportMiklos Szeredi2014-04-011-1/+138
| | | | | | | | | | | | | | Implement RENAME_EXCHANGE flag in renameat2 syscall. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: Jan Kara <jack@suse.cz>
| * ext4: rename: split out helper functionsMiklos Szeredi2014-04-011-73/+126
| | | | | | | | | | | | | | | | | | | | Cross rename (exchange source and dest) will need to call some of these helpers for both source and dest, while overwriting rename currently only calls them for one or the other. This also makes the code easier to follow. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: Jan Kara <jack@suse.cz>
| * ext4: rename: move EMLINK check upMiklos Szeredi2014-04-011-4/+4
| | | | | | | | | | | | | | | | | | Move checking i_nlink from after ext4_get_first_dir_block() to before. The check doesn't rely on the result of that function and the function only fails on fs corruption, so the order shouldn't matter. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: Jan Kara <jack@suse.cz>
| * ext4: rename: create ext4_renament structure for local varsMiklos Szeredi2014-04-011-97/+114
| | | | | | | | | | | | | | | | | | Need to split up ext4_rename() into helpers but there are too many local variables involved, so create a new structure. This also, apparently, makes the generated code size slightly smaller. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: Jan Kara <jack@suse.cz>
| * vfs: add cross-renameMiklos Szeredi2014-04-015-41/+131
| | | | | | | | | | | | | | | | | | | | If flags contain RENAME_EXCHANGE then exchange source and destination files. There's no restriction on the type of the files; e.g. a directory can be exchanged with a symlink. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: J. Bruce Fields <bfields@redhat.com>
| * vfs: lock_two_nondirectories: allow directory argsJ. Bruce Fields2014-04-011-13/+12
| | | | | | | | | | | | | | | | | | lock_two_nondirectories warned if either of its args was a directory. Instead just ignore the directory args. This is needed for locking in cross rename. Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
| * security: add flags to rename hooksMiklos Szeredi2014-04-014-9/+16
| | | | | | | | | | | | | | Add flags to security_path_rename() and security_inode_rename() hooks. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: J. Bruce Fields <bfields@redhat.com>
| * vfs: add RENAME_NOREPLACE flagMiklos Szeredi2014-04-013-8/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If this flag is specified and the target of the rename exists then the rename syscall fails with EEXIST. The VFS does the existence checking, so it is trivial to enable for most local filesystems. This patch only enables it in ext4. For network filesystems the VFS check is not enough as there may be a race between a remote create and the rename, so these filesystems need to handle this flag in their ->rename() implementations to ensure atomicity. Andy writes about why this is useful: "The trivial answer: to eliminate the race condition from 'mv -i'. Another answer: there's a common pattern to atomically create a file with contents: open a temporary file, write to it, optionally fsync it, close it, then link(2) it to the final name, then unlink the temporary file. The reason to use link(2) is because it won't silently clobber the destination. This is annoying: - It requires an extra system call that shouldn't be necessary. - It doesn't work on (IMO sensible) filesystems that don't support hard links (e.g. vfat). - It's not atomic -- there's an intermediate state where both files exist. - It's ugly. The new rename flag will make this totally sensible. To be fair, on new enough kernels, you can also use O_TMPFILE and linkat to achieve the same thing even more cleanly." Suggested-by: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: J. Bruce Fields <bfields@redhat.com>
| * vfs: add renameat2 syscallMiklos Szeredi2014-04-0110-15/+58
| | | | | | | | | | | | | | | | | | | | Add new renameat2 syscall, which is the same as renameat with an added flags argument. Pass flags to vfs_rename() and to i_op->rename() as well. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: J. Bruce Fields <bfields@redhat.com>
| * vfs: rename: use common code for dir and non-dirMiklos Szeredi2014-04-011-112/+75
| | | | | | | | | | | | | | | | | | There's actually very little difference between vfs_rename_dir() and vfs_rename_other() so move both inline into vfs_rename() which still stays reasonably readable. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: J. Bruce Fields <bfields@redhat.com>
| * vfs: rename: move d_move() upMiklos Szeredi2014-04-011-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Move the d_move() in vfs_rename_dir() up, similarly to how it's done in vfs_rename_other(). The next patch will consolidate these two functions and this is the only structural difference between them. I'm not sure if doing the d_move() after the dput is even valid. But there may be a logical explanation for that. But moving the d_move() before the dput() (and the mutex_unlock()) should definitely not hurt. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: J. Bruce Fields <bfields@redhat.com>
| * vfs: add d_is_dir()Miklos Szeredi2014-04-012-13/+17
| | | | | | | | | | | | | | | | | | Add d_is_dir(dentry) helper which is analogous to S_ISDIR(). To avoid confusion, rename d_is_directory() to d_can_lookup(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Reviewed-by: J. Bruce Fields <bfields@redhat.com>
* | Merge branch 'v4l_for_linus' of ↵Linus Torvalds2014-04-04384-7923/+44014
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: "The main set of series of patches for media subsystem, including: - document RC sysfs class - added an API to setup scancode to allow waking up systems using the Remote Controller - add API for SDR devices. Drivers are still on staging - some API improvements for getting EDID data from media inputs/outputs - new DVB frontend driver for drx-j (ATSC) - one driver (it913x/it9137) got removed, in favor of an improvement on another driver (af9035) - added a skeleton V4L2 PCI driver at documentation - added a dual flash driver (lm3646) - added a new IR driver (img-ir) - added an IR scancode decoder for the Sharp protocol - some improvements at the usbtv driver, to allow its core to be reused. - added a new SDR driver (rtl2832u_sdr) - added a new tuner driver (msi001) - several improvements at em28xx driver to fix PM support, device removal and to split the V4L2 specific bits into a separate sub-driver - one driver got converted to videobuf2 (s2255drv) - the e4000 tuner driver now follows an improved binding model - some fixes at V4L2 compat32 code - several fixes and enhancements at videobuf2 code - some cleanups at V4L2 API documentation - usual driver enhancements, new board additions and misc fixups" [ NOTE! This merge effective drops commit 4329b93b283c ("of: Reduce indentation in of_graph_get_next_endpoint"). The of_graph_get_next_endpoint() function was moved and renamed by commit fd9fdb78a9bf ("[media] of: move graph helpers from drivers/media/v4l2-core to drivers/of"). It was originally called v4l2_of_get_next_endpoint() and lived in the file drivers/media/v4l2-core/v4l2-of.c. In that original location, it was then fixed to support empty port nodes by commit b9db140c1e46 ("[media] v4l: of: Support empty port nodes"), and that commit clashes badly with the dropped "Reduce intendation" commit. I had to choose one or the other, and decided that the "Support empty port nodes" commit was more important ] * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (426 commits) [media] em28xx-dvb: fix PCTV 461e tuner I2C binding Revert "[media] em28xx-dvb: fix PCTV 461e tuner I2C binding" [media] em28xx: fix PCTV 290e LNA oops [media] em28xx-dvb: fix PCTV 461e tuner I2C binding [media] m88ds3103: fix bug on .set_tone() [media] saa7134: fix WARN_ON during resume [media] v4l2-dv-timings: add module name, description, license [media] videodev2.h: add parenthesis around macro arguments [media] saa6752hs: depends on CRC32 [media] si4713: fix Kconfig dependencies [media] Sensoray 2255 uses videobuf2 [media] adv7180: free an interrupt on failure paths in init_device() [media] e4000: make VIDEO_V4L2 dependency optional [media] af9033: Don't export functions for the hardware filter [media] af9035: use af9033 PID filters [media] af9033: implement PID filter [media] rtl2832_sdr: do not use dynamic stack allocation [media] e4000: fix 32-bit build error [media] em28xx-audio: make sure audio is unmuted on open() [media] DocBook media: v4l2_format_sdr was renamed to v4l2_sdr_format ...
| * | [media] em28xx-dvb: fix PCTV 461e tuner I2C bindingAntti Palosaari2014-03-311-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing m88ts2022 module reference counts as removing that module is not allowed when it is used by em28xx-dvb module. That same module was not unregistered correctly, fix it too. Error cases validated by returning errors from m88ds3103, m88ts2022 and a8293 probe(). Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | Revert "[media] em28xx-dvb: fix PCTV 461e tuner I2C binding"Mauro Carvalho Chehab2014-03-311-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first hunk of this patch got merged wrong, likely due to some changes at the em28xx resume code. Revert it to reapply it right. This reverts commit 37571b163c15831cd0a213151c21387363dbf15b. Reported-by: Chris Lee <updatelee@gmail.com> Reported-by: Hans Verkuil <hverkuil@xs4all.nl> Cc: stable@vger.kernel.org # Don't apply this patch or 37571b163c15 Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] em28xx: fix PCTV 290e LNA oopsAntti Palosaari2014-03-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pointer to device state has been moved to different location during some change. PCTV 290e LNA function still uses old pointer, carried over FE priv, and it crash. Reported-by: Janne Kujanpää <jikuja@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] em28xx-dvb: fix PCTV 461e tuner I2C bindingAntti Palosaari2014-03-281-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing m88ts2022 module reference counts as removing that module is not allowed when it is used by em28xx-dvb module. That same module was not unregistered correctly, fix it too. Error cases validated by returning errors from m88ds3103, m88ts2022 and a8293 probe(). Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] m88ds3103: fix bug on .set_tone()Antti Palosaari2014-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Band switching didn't worked always reliably as there was one register bit set wrong. Thanks to Robert Schlabbach for pointing this bug and solution. Reported-by: Robert Schlabbach <Robert.Schlabbach@gmx.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] saa7134: fix WARN_ON during resumeHans Verkuil2014-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Cc: stable@vger.kernel.org # for v3.9 and up Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] v4l2-dv-timings: add module name, description, licenseHans Verkuil2014-03-281-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | I completely forgot to add them when I made this module. Loading this module without it will taint the kernel, which is not intended. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: stable@vger.kernel.org # for v3.12 and up Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] videodev2.h: add parenthesis around macro argumentsHans Verkuil2014-03-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | bt->width should be (bt)->width, and same for the other fields. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: stable@vger.kernel.org # For 3.12 or upper Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] saa6752hs: depends on CRC32Hans Verkuil2014-03-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Have saa6752hs select CRC32. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] si4713: fix Kconfig dependenciesHans Verkuil2014-03-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SI4713 select should be I2C_SI4713 and the USB driver needs to depend on I2C as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reported-by: Paul Bolle <pebolle@tiscali.nl> Reported-by: Richard Weinberger <richard@nod.at> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] Sensoray 2255 uses videobuf2Arnd Bergmann2014-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 340a30c514 "s2255drv: upgrade to videobuf2" changed the API used by the s2255 driver, but did not modify the Kconfig statement, which can lead to build errors when no other driver already uses VIDEOBUF2_VMALLOC. This patch does the necessary Kconfig change. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] adv7180: free an interrupt on failure paths in init_device()Alexey Khoroshilov2014-03-241-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is request_irq() in init_device(), but the interrupt is not removed on failure paths. The patch adds proper error handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] e4000: make VIDEO_V4L2 dependency optionalAntti Palosaari2014-03-242-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That tuner driver is mainly for DVB API, but there is some V4L2 API controls for SDR usage. Make driver compile conditional so that V4L2 is not mandatory. Without the V4L2 support driver is build as a DVB only, without SDR controls. Fixes following errors reported by kbuild test robot: ERROR: "v4l2_ctrl_auto_cluster" [drivers/media/tuners/e4000.ko] undefined! ERROR: "v4l2_ctrl_new_std" [drivers/media/tuners/e4000.ko] undefined! ERROR: "v4l2_ctrl_handler_init_class" [drivers/media/tuners/e4000.ko] undefined! ERROR: "v4l2_ctrl_handler_free" [drivers/media/tuners/e4000.ko] undefined! Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] af9033: Don't export functions for the hardware filterMauro Carvalho Chehab2014-03-144-16/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exporting functions for hardware filter is a bad idea, as it breaks compilation if: CONFIG_DVB_USB_AF9035=y CONFIG_DVB_AF9033=m Because the PID filter function calls would be hardcoded at af9035. The same doesn't happen with af9033_attach() because the dvb_attach() doesn't hardcode it. Instead, it dynamically links it at runtime. However, calling dvb_attach() multiple times is problematic, as it increments module kref. So, the better is to pass one parameter for the af9033 module to fill the hardware filters, and then use it inside af9035. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] af9035: use af9033 PID filtersAntti Palosaari2014-03-141-51/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PID filters are property of af9033 demod. Use PID filters from af9033 driver as it provides those now. Allow possible dual mode on USB 1.1 mode too as bandwidth could be just enough when filters are used on both frontends. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] af9033: implement PID filterAntti Palosaari2014-03-142-0/+72
| | | | | | | | | | | | | | | | | | | | | Implement PID filter and export it via symbol. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] rtl2832_sdr: do not use dynamic stack allocationAntti Palosaari2014-03-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not use dynamic stack allocation. >> drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c:181:1: warning: 'rtl2832_sdr_wr' uses dynamic stack allocation [enabled by default] Reported-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] e4000: fix 32-bit build errorAntti Palosaari2014-03-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All error/warnings: drivers/built-in.o: In function `e4000_set_params': >> e4000.c:(.text+0x1219a1b): undefined reference to `__umoddi3' Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] em28xx-audio: make sure audio is unmuted on open()Frank Schaefer2014-03-141-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | In all cases, when the first capture is called, we need to call the code that unmutes the volume. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] DocBook media: v4l2_format_sdr was renamed to v4l2_sdr_formatHans Verkuil2014-03-142-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Update the DocBook files accordingly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] DocBook media: clarify v4l2_pix_format and v4l2_pix_format_mplane fieldsHans Verkuil2014-03-141-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | Be more specific with regards to how some of these fields are interpreted. In particular the height value and which fields can be set by the application. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] v4l2-pci-skeleton: add a V4L2 PCI skeleton driverHans Verkuil2014-03-142-0/+917
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This example driver uses all the latest frameworks and can serve as a starting point for a new V4L2 PCI driver. Originally written for a presentation on how to use V4L2 frameworks during FOSDEM 2014. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] rc: img-ir: hw: Fix min/max bits setupJames Hogan2014-03-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The calculated values for the minlen and maxlen fields, which were rounded to multiples of 2 and clamped to a valid range, were left unused. Use them in the calculation of the register value rather than using the raw input minlen and maxlen. This fixes the following warning with a W=1 build: drivers/media/rc/img-ir/img-ir-hw.c In function ‘img_ir_free_timing’: drivers/media/rc/img-ir/img-ir-hw.c +228 :23: warning: variable ‘maxlen’ set but not used [-Wunused-but-set-variable] drivers/media/rc/img-ir/img-ir-hw.c +228 :15: warning: variable ‘minlen’ set but not used [-Wunused-but-set-variable] Reported-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] rc: img-ir: jvc: Remove unused no-leader timingsJames Hogan2014-03-141-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The JVC timings included timings intended for the secondary decoder (which matches messages with no leader), however they were in the wrong part of the timings structure, repeating s00 and s01 rather than being in s10 and s11. Distinct repeat timings can't be properly supported yet for JVC anyway since the scancode callback cannot determine which decoder matched the message, so for now remove these timings and don't bother to enable the secondary decoder. This fixes the following warnings with W=1: drivers/media/rc/img-ir/img-ir-jvc.c +76 :3: warning: initialized field overwritten [-Woverride-init] drivers/media/rc/img-ir/img-ir-jvc.c +76 :3: warning: (near initialization for ‘img_ir_jvc.timings.s00’) [-Woverride-init] drivers/media/rc/img-ir/img-ir-jvc.c +81 :3: warning: initialized field overwritten [-Woverride-init] drivers/media/rc/img-ir/img-ir-jvc.c +81 :3: warning: (near initialization for ‘img_ir_jvc.timings.s01’) [-Woverride-init] Reported-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] rc: img-ir: hw: Remove unnecessary semi-colonJames Hogan2014-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix a coccicheck warning in img-ir driver: drivers/media/rc/img-ir/img-ir-hw.c:500:2-3: Unneeded semicolon Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] media: davinci: vpbe: fix build warningLad, Prabhakar2014-03-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this patch fixes following build warning drivers/media/platform/davinci/vpbe_display.c: In function 'vpbe_start_streaming': drivers/media/platform/davinci/vpbe_display.c:344: warning: unused variable 'vpbe_dev' Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] MAINTAINERS: add rtl2832_sdr driverAntti Palosaari2014-03-141-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Realtek RTL2832 SDR driver. Currently in staging as SDR API is not ready. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] rtl2832_sdr: clamp bandwidth to nearest legal value in automodeAntti Palosaari2014-03-141-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | Clamp bandwidth to nearest legal value in automode in order to pass v4l2-compliance test. Reported-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] rtl2832_sdr: fixing v4l2-compliance issuesHans Verkuil2014-03-141-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | Fix rtl2832_sdr driver v4l2-compliance issues. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] e4000: rename some variablesAntti Palosaari2014-03-142-167/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rename some variables. Change error status checks from (ret < 0) to (ret). No actual functionality changes. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] e4000: convert to Regmap APIAntti Palosaari2014-03-143-147/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That comes possible after driver was converted to kernel I2C model (I2C binding & proper I2C client with no gate control hack). All nasty low level I2C routines are now covered by regmap. Cc: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] e4000: get rid of DVB i2c_gate_ctrl()Antti Palosaari2014-03-141-82/+21
| | | | | | | | | | | | | | | | | | | | | | | | Gate control is now implemented by rtl2832 I2C adapter so we do not need proprietary DVB i2c_gate_ctrl() anymore. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] rtl28xxu: use muxed RTL2832 I2C adapters for E4000 and RTL2832_SDRAntti Palosaari2014-03-142-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | RTL2832 driver provides muxed I2C adapters for tuner bus I2C gate control. Pass those adapters to rtl2832_sdr and e4000 modules in order to get rid of proprietary DVB .i2c_gate_ctrl() callback use. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] rtl28xxu: depends on I2C_MUXAntti Palosaari2014-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need depend on I2C_MUX as rtl2832 demod used requires it. All error/warnings: warning: (DVB_USB_RTL28XXU) selects DVB_RTL2832 which has unmet direct dependencies (MEDIA_SUPPORT && DVB_CORE && I2C && I2C_MUX) ERROR: "i2c_add_mux_adapter" [drivers/media/dvb-frontends/rtl2832.ko] undefined! ERROR: "i2c_del_mux_adapter" [drivers/media/dvb-frontends/rtl2832.ko] undefined! Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] rtl28xxu: fix switch-case style issueAntti Palosaari2014-03-141-2/+1
| | | | | | | | | | | | | | | | | | | | | Use break, not return, for every case. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * | [media] rtl28xxu: attach SDR extension moduleAntti Palosaari2014-03-142-0/+21
| | | | | | | | | | | | | | | | | | | | | With that extension module it supports SDR. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>