summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [media] s5c73m3: Check v4l2_of_parse_endpoint() return valueJavier Martinez Canillas2016-02-011-1/+3
| | | | | | | | The v4l2_of_parse_endpoint() function can fail so check the return value. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] adv7604: Check v4l2_of_parse_endpoint() return valueJavier Martinez Canillas2016-02-011-1/+6
| | | | | | | | The v4l2_of_parse_endpoint() function can fail so check the return value. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] v4l: of: Correct v4l2_of_parse_endpoint() kernel-docJavier Martinez Canillas2016-02-011-1/+1
| | | | | | | | | | | The v4l2_of_parse_endpoint function kernel-doc says that the return value is always 0. But that is not true since the function can fail and a error negative code is returned on failure. So correct the kernel-doc to match. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] v4l: Merge the YUV and YVU 4:2:0 tri-planar non-contiguous formats docsLaurent Pinchart2016-02-013-164/+17Star
| | | | | | | | | The two formats are very similar, having two separate pages to describe them is overkill. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rcar_jpu: Add R-Car Gen2 Fallback Compatibility StringSimon Horman2016-02-012-6/+8
| | | | | | | | | | Add fallback compatibility string. This is in keeping with the fallback scheme being adopted wherever appropriate for drivers for Renesas SoCs. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] netup_unidvb: Remove a useless memsetChristophe JAILLET2016-02-011-2/+1Star
| | | | | | | | | | | This memory is allocated using kzalloc so there is no need to call memset(..., 0, ...) [mchehab@osg.samsung.com: as suggested by Joe Perches, It's unusual to not see the alloc above the if, removed a blank line between kzalloc/if and added a blank line after if] Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] ts2020: cancel_delayed_work_sync before device removal / kfreeErnst Martin Witte2016-02-011-0/+4
| | | | | | | | | ts2020_remove was calling kfree(dev) with possibly still active schedule_delayed_work(dev->stat_work). A similar bug in si2157 caused kernel panics in call_timer_fn e.g. after rmmod cx23885. Signed-off-by: Ernst Martin Witte <emw-linux-kernel@nocabal.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl2830: cancel_delayed_work_sync before device removal / kfreeErnst Martin Witte2016-02-011-0/+3
| | | | | | | | | rtl2830_remove was calling kfree(dev) with possibly still active schedule_delayed_work(&dev->stat_work). A similar bug in si2157 caused kernel panics in call_timer_fn e.g. after rmmod cx23885. Signed-off-by: Ernst Martin Witte <emw-linux-kernel@nocabal.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] si2157: cancel_delayed_work_sync before device removal / kfreeErnst Martin Witte2016-02-011-0/+3
| | | | | | | | | si2157_remove was calling kfree(dev) with possibly still active schedule_delayed_work(dev->stat_work). This caused kernel panics in call_timer_fn e.g. after rmmod cx23885. Signed-off-by: Ernst Martin Witte <emw-linux-kernel@nocabal.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9033: cancel_delayed_work_sync before device removal / kfreeErnst Martin Witte2016-02-011-0/+3
| | | | | | | | | af9033_remove was calling kfree(dev) with possibly still active schedule_delayed_work(&dev->stat_work). A similar bug in si2157 caused kernel panics in call_timer_fn e.g. after rmmod cx23885. Signed-off-by: Ernst Martin Witte <emw-linux-kernel@nocabal.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9013: cancel_delayed_work_sync before device removal / kfreeErnst Martin Witte2016-02-011-0/+4
| | | | | | | | | af9013_remove was calling kfree(state) with possibly still active schedule_delayed_work(&state->statistics_work). A similar bug in si2157 caused kernel panics in call_timer_fn e.g. after rmmod cx23885. Signed-off-by: Ernst Martin Witte <emw-linux-kernel@nocabal.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] rtl28xxu: retry failed i2c messagesAntti Palosaari2016-02-011-0/+8
| | | | | | | | | | | | | | Sometimes i2c transfer fails. That happens especially when large amount of data is written sequentially eg. firmware download. Problem arises with both integrated rtl2832 demod and external mn88472 demod, which is clear indicator it is busy i2c bus issue. Use i2c core retry logic in order fix the issue by repeating failed message. Another solution which also works is to add ~100us delay between i2c messages - but repeating sounds more elegant and does not cause any extra delay for success cases. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dvb-usb-dvbsky: add new product id for TT CT2-4650 CITorbjörn Jansson2016-02-012-0/+5
| | | | | | | | Add a new product id to dvb-usb-dvbsky for new version of TechnoTrend CT2-4650 CI Signed-off-by: Torbjörn Jansson <torbjorn.jansson@mbox200.swipnet.se> Reviewed-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: add support for 2nd tuner of MSI DigiVox DiversityStefan Pöschel2016-02-012-3/+4
| | | | | | | PIP tested with VLC. Diversity tested with the Windows driver. Signed-off-by: Stefan Pöschel <basic.master@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dw2102: Add support for Terratec Cinergy S2 USB BOXPhilipp Zabel2016-02-011-1/+7
| | | | | | | | | The Terratec Cinergy S2 USB BOX uses a Montage M88TS2022 tuner and a M88DS3103 demodulator, same as Technotrend TT-connect S2-4600. This patch adds the missing USB Product ID to make it work. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] si2157.c: fix frequency rangeAndrei Koshkosh2016-02-011-2/+2
| | | | | | | | | According with: https://www.silabs.com/Support%20Documents/TechnicalDocs/Si2157-short.pdf The RF input frequency range of this demod is from 42MHz to 870 MHz. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: rc: nuvoton-cir: improve locking in both interrupt handlersHeiner Kallweit2016-02-011-12/+12
| | | | | | | | Extend the locking to protect more critical actions like register accesses in the interrupt handlers. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: rc: nuvoton-cir: fix interrupt handlingHeiner Kallweit2016-02-011-17/+12Star
| | | | | | | | | | | | | | | | | | | | Only handle an interrupt if at least one combination of event bit and related interrupt bit is set. Previously it was just checked that at least one event bit and at least one interrupt bit are set. This fixes issues like the following which was caused by interrupt sharing: An interrupt intended for nvt_cir_isr was handled by nvt_cir_wake_isr first and because status bit CIR_WAKE_IRSTS_IR_PENDING was set the wake fifo was accidently cleared. This patch also fixes the bug that nvt_cir_wake_isr returned IRQ_HANDLED even if it detected that the (shared) interrupt was meant for another handler. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: rc: nuvoton-cir: fix wakeup interrupt bitsHeiner Kallweit2016-02-011-4/+1Star
| | | | | | | | Most likely a copy & paste error. The wakeup interrupt supports less triggering events. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: rc: nuvoton-cir: add locking to calls of nvt_enable_wakeHeiner Kallweit2016-02-011-6/+12
| | | | | | | Add locking to nvt_enable_wake calls. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: rc: nuvoton-cir: improve nvt_hw_detectHeiner Kallweit2016-02-012-5/+15
| | | | | | | | | Check for the case that no Nuvoton chip is found on either EFM port. Also move the position of nvt_efm_disable to reduce the time the EFM ports are locked. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: v4l: Dual license v4l2-common.h under GPL v2 and BSD licensesSakari Ailus2016-02-011-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The v4l2-common.h user space header was split off from videodev2.h, but the dual licensing of the videodev2.h (as well as other V4L2 headers) was missed. Change the license of the v4l2-common.h from GNU GPL v2 to both GNU GPL v2 and BSD. Sakari Ailus <sakari.ailus@iki.fi>: > Would you approve a license change of the patches to > include/uapi/linux/v4l2-common.h (formerly include/linux/v4l2-common.h) you > or your company have contributed from GNU GPL v2 to dual GNU GPL v2 and BSD > licenses, changing the copyright notice in the file as below (from > videodev2.h): > > -------------8<------------ > * This program is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License as published by > * the Free Software Foundation; either version 2 of the License, or > * (at your option) any later version. > * > * This program is distributed in the hope that it will be useful, > * but WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > * GNU General Public License for more details. > * > * Alternatively you can redistribute this file under the terms of the > * BSD license as stated below: > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > * 1. Redistributions of source code must retain the above copyright > * notice, this list of conditions and the following disclaimer. > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in > * the documentation and/or other materials provided with the > * distribution. > * 3. The names of its contributors may not be used to endorse or promote > * products derived from this software without specific prior written > * permission. > * > * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR > * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT > * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, > * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED > * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR > * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF > * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING > * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS > * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > -------------8<------------ Mauro Carvalho Chehab <mchehab@osg.samsung.com>: > No problem from my side. Hans Verkuil <hans.verkuil@cisco.com>: > Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Aaro Koskinen <aaro.koskinen@nokia.com>: > This fine also for us. > > Acked-by: Aaro Koskinen <aaro.koskinen@nokia.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Aaro Koskinen <aaro.koskinen@nokia.com> Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: ti-vpe: Add CAL v4l2 camera capture driverBenoit Parrot2016-02-015-0/+2467
| | | | | | | | | | | | | | | | The Camera Adaptation Layer (CAL) is a block which consists of a dual port CSI2/MIPI camera capture engine. Port #0 can handle CSI2 camera connected to up to 4 data lanes. Port #1 can handle CSI2 camera connected to up to 2 data lanes. The driver implements the required API/ioctls to be V4L2 compliant. Driver supports the following: - V4L2 API using DMABUF/MMAP buffer access based on videobuf2 api - Asynchronous sensor sub device registration - DT support Signed-off-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] MAINTAINERS: Add ti-vpe maintainer entryBenoit Parrot2016-02-011-0/+8
| | | | | | Signed-off-by: Benoit Parrot <bparrot@ti.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: ti-vpe: Document CAL driverBenoit Parrot2016-02-011-0/+72
| | | | | | | | | Device Tree bindings for the Camera Adaptation Layer (CAL) driver Signed-off-by: Benoit Parrot <bparrot@ti.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] vivid: fix broken Bayer text renderingHans Verkuil2016-02-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | Sometimes when a Bayer pixelformat is selected the rendering of the OSD text by vivid was all wrong: every other line of the text was shifted by half the width or more. It turned out that to render Bayer formats the interleaved boolean is set to true in the tpg. This mode indicates a semi-biplanar mode where two interleaved planes are used to render the frame. From outside the tpg it looks like a single plane, but internally it is two planes. However, in the tpg_s_bytesperline() function the interleaved bool wasn't checked and only the bytesperline value for plane 0 was updated. But for the interleaved mode the same value has to be copied to bytesperline[1] as well. The effect was that whatever old value was left in bytesperline[1] was used, which caused all sorts of weird and seemingly unpredictable shifts. Reported-by: Ove Brynestad <ovebryne@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: v4l2-compat-ioctl32: fix missing length copy in put_v4l2_buffer32Tiffany Lin2016-02-011-13/+8Star
| | | | | | | | | | | | In v4l2-compliance utility, test QUERYBUF required correct length value to go through each planar to check planar's length in multi-planar buffer type Signed-off-by: Tiffany Lin <tiffany.lin@mediatek.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: <stable@vger.kernel.org> # for v3.7 and up Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] DocBook media: make explicit that standard/timings never change ↵Hans Verkuil2016-02-012-2/+22
| | | | | | | | | | | | | | | automatically A driver might detect a new standard or DV timings, but it will never change to those new timings automatically. Instead it will send an event and let the application take care of it. Make this explicit in the documentation. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: adv7604: implement get_selectionUlrich Hecht2016-02-011-0/+21
| | | | | | | | | The rcar_vin driver relies on this. Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] tc358743: Use local array with fixed size in i2c writeMats Randgaard2016-02-011-8/+8
| | | | | | | | | | | | | i2c_wr() is called from ops and the interrupt service routine, while state->wr_data is shared and unprotected, and could be overwritten. This shared buffer is therefore replaced with a local array with fixed size. The array has the size of one EDID block (128 bytes) + 2 bytes i2c address, and the EDID is written block by block (up to 8 blocks). Signed-off-by: Mats Randgaard <matrandg@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] v4l2-dv-timings: skip standards check for V4L2_DV_BT_CAP_CUSTOMHans Verkuil2016-02-011-1/+2
| | | | | | | | | Skip validating the standards field in v4l2_valid_dv_timings() if the V4L2_DV_BT_CAP_CUSTOM capability is set, since that implies that non-standard timings are allowed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] radio-si476x: add return value check to avoid dead codeFugang Duan2016-02-011-2/+2
| | | | | | | | | | | | | | | | | | Dead code found on below code: si476x_radio_add_new_custom(radio, SI476X_IDX_DIVERSITY_MODE); if (rval < 0) goto exit; si476x_radio_add_new_custom(radio, SI476X_IDX_INTERCHIP_LINK); if (rval < 0) ====> Dead code !!! goto exit; The piece of code miss return value check after calling .si476x_radio_add_new_custom(), the patch fix it. Signed-off-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] cx231xx: Fix memory leakJean-Baptiste Theou2016-02-011-0/+5
| | | | | | | | | | dma_area needs to be freed when the device is closed. Based on em23xx-audio.c Signed-off-by: Jean-Baptiste Theou <jtheou@adeneo-embedded.us> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] wl128x: fix typo in MODULE_PARM_DESCDan Carpenter2016-02-011-1/+1
| | | | | | | | | The module_param() is "default_rds_buf" and the MODULE_PARM_DESC() should match. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] staging: media: lirc: fix MODULE_PARM_DESC typoDan Carpenter2016-02-011-1/+1
| | | | | | | | It "tx_mask" was intended instead of "tx_maxk". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] vpx3220: signedness bug in vpx3220_fp_read()Dan Carpenter2016-02-011-1/+1
| | | | | | | | | The intent was to return -1 on error and that's what the callers expect but the current code returns USHRT_MAX instead. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] coda: fix first encoded frame payloadPhilipp Zabel2016-02-011-1/+1
| | | | | | | | | | | | | | | | During the recent vb2_buffer restructuring, the calculation of the buffer payload reported to userspace was accidentally broken for the first encoded frame, counting only the length of the headers. This patch re-adds the length of the actual frame data. Fixes: 2d7007153f0c ("[media] media: videobuf2: Restructure vb2_buffer") Reported-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Jan Luebbe <jlu@pengutronix.de> Cc: <stable@vger.kernel.org> # for v4.4 and up Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: bt8xx: constify sp887x_config structureJulia Lawall2016-02-011-1/+1
| | | | | | | | | | This sp887x_config structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] media: bt8xx: constify or51211_config structureJulia Lawall2016-02-011-1/+1
| | | | | | | | | | The or51211_config structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] drivers/media/usb/dvb-usb-v2: constify mxl111sf_tuner_config structureJulia Lawall2016-02-013-8/+8
| | | | | | | | | | | | | | This mxl111sf_tuner_config structure is never modified, so declare it as const. There are some indentation changes to remain within 80 columns. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Michael Ira Krufky <mkrufky@linuxtv.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] av7110: constify sp8870_config structureJulia Lawall2016-02-011-1/+1
| | | | | | | | | | | This sp8870_config structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] usbtv: correctly handling failed allocationInsu Yun2016-02-011-0/+4
| | | | | | | | | Since kzalloc can be failed, if not properly handled, NULL dereference could be happened. Signed-off-by: Insu Yun <wuninsu@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] cx231xx: correctly handling failed allocationInsu Yun2016-02-011-0/+2
| | | | | | | | | Since kmalloc can be failed in memory pressure, if not properly handled, NULL dereference can be happend Signed-off-by: Insu Yun <wuninsu@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] hdpvr: Refactoring for hdpvr_read()Markus Elfring2016-02-011-4/+2Star
| | | | | | | | | | Let us return directly if the element "status" of the variable "buf" indicates "BUFSTAT_READY". A check repetition can be excluded for the variable "ret" at the end then. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] au0828: Refactoring for start_urb_transfer()Markus Elfring2016-02-011-7/+5Star
| | | | | | | | | | | | | | | | | This issue was detected by using the Coccinelle software. 1. Let us return directly if a buffer allocation failed. 2. Delete the jump label "err" then. 3. Drop the explicit initialisation for the variable "ret" at the beginning. 4. Return zero as a constant at the end. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] bttv: Returning only value constants in two functionsMarkus Elfring2016-02-011-19/+6Star
| | | | | | | | | Return constant integer values without storing them in the local variable "err" or "rc". Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] vim2m: return error if driver registration failsNiklas Söderlund2016-02-011-1/+1
| | | | | | | | Don't hide the error code. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] stk1160: Remove redundant vb2_buf payload setEzequiel Garcia2016-02-011-1/+0Star
| | | | | | | | | Calling vb2_set_plane_payload is enough, there's no need to set the planes[] bytesused field. Remove it. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] bttv-driver, usbvision-video: use to_video_device()Geliang Tang2016-02-012-19/+10Star
| | | | | | | | Use to_video_device() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] usbtv: discard redundant video fieldsNikola Forró2016-02-012-14/+20
| | | | | | | | | | | | | | | There are many dropped fields with some sources, leading to many redundant fields without counterparts. When this redundant field is odd, a new frame is pushed containing this odd field interleaved with whatever was left in the buffer, causing video artifacts. Do not push a new frame after processing every odd field, but do it only after those which come after an even field. Signed-off-by: Nikola Forró <nikola.forro@gmail.com> Acked-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>