summaryrefslogtreecommitdiff
path: root/drivers/media/usb
AgeCommit message (Collapse)Author
2017-06-06[media] rainshadow-cec: Fix missing spin_lock_init()Wei Yongjun
The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. This is detected by Coccinelle semantic patch. Fixes: 0f314f6c2e77 ("[media] rainshadow-cec: new RainShadow Tech HDMI CEC driver") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-04[media] cec: select CEC_CORE instead of depend on itHans Verkuil
The CEC framework is used by both drm and media. That makes it tricky to get the dependencies right. This patch moves the CEC_CORE and MEDIA_CEC_NOTIFIER config options out of the media menu and instead drivers that want to use CEC should select CEC_CORE and MEDIA_CEC_NOTIFIER (if needed). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-06-04[media] rainshadow-cec: ensure exit_loop is intializedColin Ian King
exit_loop is not being initialized, so it contains garbage. Ensure it is initialized to false. Detected by CoverityScan, CID#1436409 ("Uninitialized scalar variable") Fixes: ea6a69defd3311 ("[media] rainshadow-cec: avoid -Wmaybe-uninitialized warning") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-05-05Merge tag 'media/v4.12-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: "Media updates for v4.12-rc1: - new driver to support mediatek jpeg in hardware codec - rc-lirc, s5p-cec and st-cec staging drivers got promoted - hardware histogram support for vsp1 driver - added Virtual Media Controller driver, to make easier to test the media controller - added a new CEC driver (rainshadow-cec) - removed two staging LIRC drivers for obscure hardware that are too obsolete - added support for Intel SR300 Depth camera - some improvements at CEC and RC core - lots of driver cleanups, improvements all over the tree With this series, we're finally getting rid of the LIRC staging driver. There's just one left (lirc_zilog), with require more care, as part of its functionality (IR RX) is already provided by another driver. Work in progress to convert it on the proper way" * tag 'media/v4.12-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (304 commits) [media] ov2640: print error if devm_*_optional*() fails [media] atmel-isc: Fix the static checker warning [media] ov2640: add support for MEDIA_BUS_FMT_YVYU8_2X8 and MEDIA_BUS_FMT_VYUY8_2X8 [media] ov2640: fix vflip control [media] ov2640: fix duplicate width+height returning from ov2640_select_win() [media] ov2640: add missing write to size change preamble [media] ov2640: add information about DSP register 0xc7 [media] ov2640: improve banding filter register definitions/documentation [media] ov2640: fix init sequence alignment [media] ov2640: make GPIOLIB an optional dependency [media] xc5000: fix spelling mistake: "calibration" [media] vidioc-queryctrl.rst: fix menu/int menu references [media] media-entity: only call dev_dbg_obj if mdev is not NULL [media] pixfmt-meta-vsp1-hgo.rst: remove spurious '-' [media] mtk-vcodec: avoid warnings because of empty macros [media] coda: bump maximum number of internal framebuffers to 17 [media] media: mtk-vcodec: remove informative log [media] subdev-formats.rst: remove spurious '-' [media] dw2102: limit messages to buffer size [media] ttusb2: limit messages to buffer size ...
2017-05-03Merge branch 'i2c/for-4.12' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wilfram Sang: "I2C has the following updates for you: - an immutable cross-subsystem branch fixing PMIC access on Intel Baytrail - bigger driver updates to the designware, meson, exynos5 drivers - new i2c_acpi_new_device() function to create devices from ACPI - struct i2c_driver has now a flag 'disable_i2c_core_irq_mapping' to allow custom IRQ mapping in case the default does not fit - mux subsystem centralized error messages in its core - new driver for ltc4306 i2c mux - usual set of small updates" * 'i2c/for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (44 commits) i2c: thunderx: Enable HWMON class probing i2c: rcar: clarify PM handling with more comments i2c: rcar: fix resume by always initializing registers before transfer i2c: tegra: fix spelling mistake: "contoller" -> "controller" i2c: exynos5: use core helper to get driver data i2c: exynos5: de-duplicate error logs on clock setup i2c: exynos5: simplify clock frequency handling i2c: exynos5: simplify timings calculation i2c: designware-baytrail: fix potential null pointer dereference on dev i2c: designware: Get selected speed mode sda-hold-time via ACPI [media] cx231xx: stop double error reporting i2c: core: Allow drivers to disable i2c-core irq mapping i2c: core: Add new i2c_acpi_new_device helper function i2c: core: Allow getting ACPI info by index i2c: img-scb: use setup_timer i2c: i2c-scmi: add a MS HID i2c: mux: ltc4306: LTC4306 and LTC4305 I2C multiplexer/switch dt-bindings: i2c: mux: ltc4306: Add dt-bindings for I2C multiplexer/switch i2c: mux: reg: stop double error reporting i2c: mux: pinctrl: stop double error reporting ...
2017-05-02Merge tag 'docs-4.12' of git://git.lwn.net/linuxLinus Torvalds
Pull documentation update from Jonathan Corbet: "A reasonably busy cycle for documentation this time around. There is a new guide for user-space API documents, rather sparsely populated at the moment, but it's a start. Markus improved the infrastructure for converting diagrams. Mauro has converted much of the USB documentation over to RST. Plus the usual set of fixes, improvements, and tweaks. There's a bit more than the usual amount of reaching out of Documentation/ to fix comments elsewhere in the tree; I have acks for those where I could get them" * tag 'docs-4.12' of git://git.lwn.net/linux: (74 commits) docs: Fix a couple typos docs: Fix a spelling error in vfio-mediated-device.txt docs: Fix a spelling error in ioctl-number.txt MAINTAINERS: update file entry for HSI subsystem Documentation: allow installing man pages to a user defined directory Doc/PM: Sync with intel_powerclamp code behavior zr364xx.rst: usb/devices is now at /sys/kernel/debug/ usb.rst: move documentation from proc_usb_info.txt to USB ReST book convert philips.txt to ReST and add to media docs docs-rst: usb: update old usbfs-related documentation arm: Documentation: update a path name docs: process/4.Coding.rst: Fix a couple of document refs docs-rst: fix usb cross-references usb: gadget.h: be consistent at kernel doc macros usb: composite.h: fix two warnings when building docs usb: get rid of some ReST doc build errors usb.rst: get rid of some Sphinx errors usb/URB.txt: convert to ReST and update it usb/persist.txt: convert to ReST and add to driver-api book usb/hotplug.txt: convert to ReST and add to driver-api book ...
2017-04-20convert philips.txt to ReST and add to media docsMauro Carvalho Chehab
The philips.txt file were at the wrong place: it should be, instead, at Documentation/media. Move and convert it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2017-04-19[media] cx231xx: stop double error reportingPeter Rosin
i2c_mux_add_adapter already logs a message on failure. Reviewed-by: Wolfram Sang <wsa@the-dreams.de> Reviewed-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Peter Rosin <peda@axentia.se>
2017-04-19[media] dw2102: limit messages to buffer sizeAlyssa Milburn
Otherwise the i2c transfer functions can read or write beyond the end of stack or heap buffers. Signed-off-by: Alyssa Milburn <amilburn@zall.org> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-19[media] ttusb2: limit messages to buffer sizeAlyssa Milburn
Otherwise ttusb2_i2c_xfer can read or write beyond the end of static and heap buffers. Signed-off-by: Alyssa Milburn <amilburn@zall.org> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-19[media] cec: Kconfig cleanupHans Verkuil
The Kconfig options for the CEC subsystem were a bit messy. In addition there were two cec sources (cec-edid.c and cec-notifier.c) that were outside of the media/cec directory, which was weird. Move those sources to media/cec as well. The cec-edid and cec-notifier functionality is now part of the cec module and these are no longer separate modules. Also remove the MEDIA_CEC_EDID config option and include it with the main CEC config option (which defined CEC_EDID anyway). Added static inlines to cec-edid.h for dummy functions when CEC_CORE isn't defined. CEC drivers should now depend on CEC_CORE. CEC drivers that need the cec-notifier functionality must explicitly select CEC_NOTIFIER. The s5p-cec and stih-cec drivers depended on VIDEO_DEV instead of CEC_CORE, fix that as well. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-18[media] zr364xx: enforce minimum size when reading headerAlyssa Milburn
This code copies actual_length-128 bytes from the header, which will underflow if the received buffer is too small. Signed-off-by: Alyssa Milburn <amilburn@zall.org> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-18[media] digitv: limit messages to buffer sizeAlyssa Milburn
Return an error rather than memcpy()ing beyond the end of the buffer. Internal callers use appropriate sizes, but digitv_i2c_xfer may not. Signed-off-by: Alyssa Milburn <amilburn@zall.org> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-18[media] media: stk1160: Add Kconfig help on snd-usb-audio requirementEzequiel Garcia
The Kconfig currently makes no reference to the snd-usb-audio driver, which supports audio capture for this type of devices. Just in case, let's make sure the requirement is mentioned in the description. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-17[media] em28xx: add support for V4L2_PIX_FMT_SRGGB8Frank Schaefer
Adding support for SRGGB8 is as simple as adding a new entry at struct em28xx_fmt. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-17[media] em28xx: shed some light on video input formatsFrank Schaefer
CbYCrY has been identified by looking into the tvp5150 driver and the saa7115 datasheet. YUV formats have been verified with em2765 + ov2640 (VAD Laplace webcam). RGB8 formats have been verified with em2710/em2820 + mt9v011 (Silvercrest webcam 1.3mpix). I also did some cross-checking with these two camera devices and 0x08-0x0b are at least 16 bits per pixel formats on em2710/em2820, too, and 0x0c-0x0f are at least 8 bits per pixel formats on em2765, too. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-17[media] em28xx: don't treat device as webcam if an unknown sensor is detectedFrank Schaefer
With an unknown sensor, norm_maxw() and norm_maxh() return 0 as max. height and width values, which causes a devide by zero in size_to_scale(). Of course we could use speculative default values for unknown sensors, but the chance that the device works at this resolution without any driver/setup is very low and therefore not worth the efforts. Instead, just don't treat the device as camera. A message will then be printed to the log that the device isn't supported. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-17[media] em28xx: add missing auto-selections for buildFrank Schaefer
With MEDIA_SUBDRV_AUTOSELECT enabled in the kernel config, the em28xx driver currently does't select some used subdrivers. Fix this by adding the missing auto-selections to the Kconfig file. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-17[media] em28xx: get rid of the dummy clock sourceFrank Schaefer
The v4l2 dummy clock has been added with commit fc5d0f8a8878 ("V4L2: em28xx: register a V4L2 clock source") to be able to use the ov2640 soc_camera driver. Since commit 46796cfcd346 ("ov2640: use standard clk and enable it") it is no longer required. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-17[media] em28xx: simplify ID-reading from Micron sensorsFrank Schaefer
Use i2c_smbus_read_word_data() instead of i2c_master_send() and i2c_master_recv() for reading the ID of Micorn sensors. i2c_smbus_read_word_data() assumes that byes are in little-endian, so, it uses: data->word = msgbuf1[0] | (msgbuf1[1] << 8); However, Micron datasheet describes the ID as if they were read in big-endian. So, we need to change the byte order in order to match the ID number as described on their datasheets. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-17[media] em28xx: Add new USB ID eb1a:5051Alexandre-Xavier Labonté-Lamoureux
Add new usbid eb1a:5051 for the Ion Video 2 PC MKII, Startech svid2usb23 and Raygo R12-41373. Signed-off-by: Alexandre-Xavier Labonté-Lamoureux <alexandrexavier@live.ca> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-17[media] tm6000: Fix resource freeing in 'tm6000_prepare_isoc()'Christophe JAILLET
'usb_free_urb(urb)' is a no-op, because urb is known to be NULL. It is likelly that releasing resources allocated by 'tm6000_alloc_urb_buffers()' just a few lines above is expected here. This has been spotted by the following coccinelle script: @@ expression ret, x, e; identifier f; @@ * if (x == NULL) { ... when != x = e; ( * f(<+...x...+>); | * ret = f(<+...x...+>); ) ... } Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-17[media] dvb-usb-dibusb-mc-common: Add MODULE_LICENSEBen Hutchings
dvb-usb-dibusb-mc-common is licensed under GPLv2, and if we don't say so then it won't even load since it needs a GPL-only symbol. Fixes: e91455a1495a ("[media] dvb-usb: split out common parts of dibusb") Reported-by: Dominique Dumont <dod@debian.org> Cc: stable@vger.kernel.org # 4.9+ Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-10[media] em28xx: drop last soc_camera linkHans Verkuil
The em28xx driver still used the soc_camera.h header for the ov2640 driver. Since this driver no longer uses soc_camera, that include can be removed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-10[media] rainshadow-cec: new RainShadow Tech HDMI CEC driverHans Verkuil
This driver supports the RainShadow Tech USB HDMI CEC adapter. See: http://rainshadowtech.com/HdmiCecUsb.html Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-10[media] uvcvideo: Add support for Intel SR300 depth cameraDaniel Patrick Johnson
Add support for Intel SR300 depth camera in uvc driver. This includes adding three uvc GUIDs for the required pixel formats and updating the uvc driver GUID-to-4cc tables with the new formats. Signed-off-by: Daniel Patrick Johnson <teknotus@teknot.us> Signed-off-by: Aviv Greenberg <avivgr@gmail.com> Signed-off-by: Evgeni Raikhel <evgeni.raikhel@intel.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-10[media] uvcvideo: Don't record timespec_subKieran Bingham
The statistics function subtracts two timespecs manually. A helper is provided by the kernel to do this. Replace the implementation, using the helper. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-10[media] uvcvideo: Fix empty packet statisticKieran Bingham
The frame counters are inadvertently counting packets with content as empty. Fix it by correcting the logic expression Fixes: 7bc5edb00bbd [media] uvcvideo: Extract video stream statistics Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-10[media] cx231xx-audio: fix NULL-deref at probeJohan Hovold
Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory beyond the endpoint array should a malicious device lack the expected endpoints. Fixes: e0d3bafd0258 ("V4L/DVB (10954): Add cx231xx USB driver") Cc: stable <stable@vger.kernel.org> # 2.6.30 Cc: Sri Deevi <Srinivasa.Deevi@conexant.com> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-10[media] cx231xx-audio: fix init error pathJohan Hovold
Make sure to release the snd_card also on a late allocation error. Fixes: e0d3bafd0258 ("V4L/DVB (10954): Add cx231xx USB driver") Cc: stable <stable@vger.kernel.org> # 2.6.30 Cc: Sri Deevi <Srinivasa.Deevi@conexant.com> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-10[media] cx231xx-cards: fix NULL-deref at probeJohan Hovold
Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory beyond the endpoint array should a malicious device lack the expected endpoints. Fixes: e0d3bafd0258 ("V4L/DVB (10954): Add cx231xx USB driver") Cc: stable <stable@vger.kernel.org> # 2.6.30 Cc: Sri Deevi <Srinivasa.Deevi@conexant.com> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-10[media] usbvision: fix NULL-deref at probeJohan Hovold
Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer or accessing memory beyond the endpoint array should a malicious device lack the expected endpoints. Fixes: 2a9f8b5d25be ("V4L/DVB (5206): Usbvision: set alternate interface modification") Cc: stable <stable@vger.kernel.org> # 2.6.21 Cc: Thierry MERLE <thierry.merle@free.fr> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-10[media] dib0700: fix NULL-deref at probeJohan Hovold
Make sure to check the number of endpoints to avoid dereferencing a NULL-pointer should a malicious device lack endpoints. Fixes: c4018fa2e4c0 ("[media] dib0700: fix RC support on Hauppauge Nova-TD") Cc: stable <stable@vger.kernel.org> # 3.16 Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-05[media] usb: pulse8-cec: Use cec_get_drvdata()Jose Abreu
Use helper function to get driver private data from CEC adapter. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-05[media] usb: au0828: remove redundant codeColin Ian King
The check for ret being non-zero is false as ret is always zero, hence we have redundant dead code that can be removed. Detected with CoverityScan, CID#112968 ("Constant' variable guards dead code (DEADCODE)'") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-05[media] gspca: konica: add missing endpoint sanity checkJohan Hovold
Make sure to check the number of endpoints to avoid accessing memory beyond the endpoint array should a device lack the expected endpoints. Note that, as far as I can tell, the gspca framework has already made sure there is at least one endpoint in the current alternate setting so there should be no risk for a NULL-pointer dereference here. Fixes: b517af722860 ("V4L/DVB: gspca_konica: New gspca subdriver for konica chipset using cams") Cc: stable <stable@vger.kernel.org> # 2.6.37 Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-04Merge tag 'v4.11-rc5' into patchworkMauro Carvalho Chehab
Linux 4.11-rc5 * tag 'v4.11-rc5': (1168 commits) Linux 4.11-rc5 tty: pl011: fix earlycon work-around for QDF2400 erratum 44 kasan: do not sanitize kexec purgatory drivers/rapidio/devices/tsi721.c: make module parameter variable name unique mm/hugetlb.c: don't call region_abort if region_chg fails kasan: report only the first error by default hugetlbfs: initialize shared policy as part of inode allocation mm: fix section name for .data..ro_after_init mm, hugetlb: use pte_present() instead of pmd_present() in follow_huge_pmd() mm: workingset: fix premature shadow node shrinking with cgroups mm: rmap: fix huge file mmap accounting in the memcg stats mm: move mm_percpu_wq initialization earlier mm: migrate: fix remove_migration_pte() for ksm pages nfs: flexfiles: fix kernel OOPS if MDS returns unsupported DS type NFSv4.1 fix infinite loop on IO BAD_STATEID error serial: 8250_EXAR: fix duplicate Kconfig text and add missing help text tty/serial: atmel: fix TX path in atmel_console_write() tty/serial: atmel: fix race condition (TX+DMA) serial: mxs-auart: Fix baudrate calculation irqchip/mips-gic: Fix Local compare interrupt ...
2017-03-24Merge tag 'media/v4.11-3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - dvb-usb-firmware: don't do DMA on stack - coda/imx-vdoa: platform_driver should not be const - bdisp: Clean up file handle in open() error path - exynos-gsc: Do not swap cb/cr for semi planar formats * tag 'media/v4.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] exynos-gsc: Do not swap cb/cr for semi planar formats [media] bdisp: Clean up file handle in open() error path [media] coda/imx-vdoa: platform_driver should not be const [media] dvb-usb-firmware: don't do DMA on stack
2017-03-24[media] cxusb: dvico remotes are necSean Young
Adjust the keymap to use the correct nec scancodes, and adjust the rc driver to output the correct nec scancodes. Now the keymap can be used with any nec receiver, and the rc device should work with any nec keymap. Tested-by: Vincent McIntyre <vincent.mcintyre@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-22[media] em28xx: reduce stack usage in sensor probing functionsFrank Schaefer
It's no longer necessary to keep the i2c_client in the device struct unmodified until a sensor is found, so reduce stack usage in em28xx_probe_sensor_micron() and em28xx_probe_sensor_omnivision() by using a pointer to the client instead of a local copy. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-22[media] go7007: improve subscribe event handlingGustavo Padovan
We already check for the V4L2_EVENT_CTRL inside v4l2_ctrl_subscribe_event() so just move this function to the default: branch of the switch and let it does the job for us. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-09Merge tag 'media/v4.11-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Media regression fixes: - serial_ir: fix a Kernel crash during boot on Kernel 4.11-rc1, due to an IRQ code called too early - other IR regression fixes at lirc and at the raw IR decoding - a deadlock fix at the RC nuvoton driver - fix another issue with DMA on stack at dw2102 driver There's an extra patch there that change a driver interface for the SoC VSP1 driver, with is shared between the DRM and V4L2 driver. The patch itself is trivial, and was acked by David Arlie" * tag 'media/v4.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] v4l: vsp1: Adapt vsp1_du_setup_lif() interface to use a structure [media] dw2102: don't do DMA on stack [media] rc: protocol is not set on register for raw IR devices [media] rc: raw decoder for keymap protocol is not loaded on register [media] rc: nuvoton: fix deadlock in nvt_write_wakeup_codes [media] lirc: fix dead lock between open and wakeup_filter [media] serial_ir: ensure we're ready to receive interrupts
2017-03-08[media] dvb-usb-firmware: don't do DMA on stackStefan Brüns
The buffer allocation for the firmware data was changed in commit 43fab9793c1f ("[media] dvb-usb: don't use stack for firmware load") but the same applies for the reset value. Fixes: 43fab9793c1f ("[media] dvb-usb: don't use stack for firmware load") Cc: stable@vger.kernel.org Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-06[media] dw2102: don't do DMA on stackJonathan McDowell
On Kernel 4.9, WARNINGs about doing DMA on stack are hit at the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach(). Both were due to the use of buffers on the stack as parameters to dvb_usb_generic_rw() and the resulting attempt to do DMA with them. The device was non-functional as a result. So, switch this driver over to use a buffer within the device state structure, as has been done with other DVB-USB drivers. Tested with TechnoTrend TT-connect S2-4600. [mchehab@osg.samsung.com: fixed a warning at su3000_i2c_transfer() that state var were dereferenced before check 'd'] Signed-off-by: Jonathan McDowell <noodles@earth.li> Cc: <stable@vger.kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-06Merge tag 'v4.11-rc1' into patchworkMauro Carvalho Chehab
Linux 4.11-rc1 * tag 'v4.11-rc1': (10730 commits) Linux 4.11-rc1 strparser: destroy workqueue on module exit Documentation/sphinx: fix primary_domain configuration docs: Fix htmldocs build failure doc/ko_KR/memory-barriers: Update control-dependencies section pcieaer doc: update the link Documentation: Update path to sysrq.txt sfc: fix IPID endianness in TSOv2 sfc: avoid max() in array size rds: remove unnecessary returned value check rxrpc: Fix potential NULL-pointer exception nfp: correct DMA direction in XDP DMA sync nfp: don't tell FW about the reserved buffer space net: ethernet: bgmac: mac address change bug net: ethernet: bgmac: init sequence bug xen-netback: don't vfree() queues under spinlock xen-netback: keep a local pointer for vif in backend_disconnect() netfilter: nf_tables: don't call nfnetlink_set_err() if nfnetlink_send() fails netfilter: nft_set_rbtree: incorrect assumption on lower interval lookups netfilter: nf_conntrack_sip: fix wrong memory initialisation ...
2017-03-03[media] dvb-usb-firmware: don't do DMA on stackStefan Brüns
The buffer allocation for the firmware data was changed in commit 43fab9793c1f ("[media] dvb-usb: don't use stack for firmware load") but the same applies for the reset value. Fixes: 43fab9793c1f ("[media] dvb-usb: don't use stack for firmware load") Cc: stable@vger.kernel.org Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-03[media] dvb-usb-cxusb: Geniatech T230C supportEvgeny Plehov
Updated Geniatech DVB-T/T2 stick support. Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-03[media] tveeprom: get rid of unused arg on tveeprom_hauppauge_analog()Mauro Carvalho Chehab
tveeprom_hauppauge_analog() used to need the I2C adapter in order to print debug messages. As it now uses pr_foo() facilities since commit 6037b3ca28f4 ("[media] tveeprom: print log messages using pr_foo()"), the first argument of the function is not needed anymore. So, get rid of it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-03[media] mxl111sf: reduce stack usage in init functionArnd Bergmann
mxl111sf uses a lot of kernel stack memory as it puts an i2c_client structure on the stack: drivers/media/usb/dvb-usb-v2/mxl111sf.c: In function 'mxl111sf_init': drivers/media/usb/dvb-usb-v2/mxl111sf.c:953:1: error: the frame size of 1248 bytes is larger than 1152 bytes [-Werror=frame-larger-than=] We can avoid doing this by open-coding the call to i2c_transfer() instead of calling tveeprom_read(), and not passing an i2c_client pointer to tveeprom_hauppauge_analog(), which would ignore that anyway. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-03[media] cx231xx-i2c: reduce stack size in bus scanArnd Bergmann
The cx231xx_do_i2c_scan function needs a lot of stack because it puts an i2c_client structure on it: drivers/media/usb/cx231xx/cx231xx-i2c.c: In function 'cx231xx_do_i2c_scan': drivers/media/usb/cx231xx/cx231xx-i2c.c:518:1: error: the frame size of 1248 bytes is larger than 1152 bytes [-Werror=frame-larger-than=] This changes it to call i2c_transfer() directly instead, avoiding the need for the structure. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>