summaryrefslogtreecommitdiff
path: root/drivers/media/usb
AgeCommit message (Collapse)Author
2015-05-01[media] cx231xx: fix bad indentingMauro Carvalho Chehab
drivers/media/usb/cx231xx/cx231xx-avcore.c:1598 cx231xx_set_DIF_bandpass() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-core.c:656 cx231xx_demod_reset() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-core.c:659 cx231xx_demod_reset() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-core.c:664 cx231xx_demod_reset() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-core.c:669 cx231xx_demod_reset() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-core.c:673 cx231xx_demod_reset() warn: inconsistent indenting drivers/media/usb/cx231xx/cx231xx-417.c:1164 cx231xx_initialize_codec() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] zc3xx: remove dead code and uneeded gotosMauro Carvalho Chehab
As reported by smatch: drivers/media/usb/gspca/zc3xx.c:5994 transfer_update() info: ignoring unreachable code. That happens because there's a return that it is never called, as the work queue runs an infinite loop, except when the device is put to sleep or an error happens. When an error happens, a break statement is enough to go out of the loop. So, let's remove the goto, as break is the typical instruction used to end a loop. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] zc3xx: don't go past quality arrayMauro Carvalho Chehab
drivers/media/usb/gspca/zc3xx.c:6363 zcxx_s_ctrl() error: buffer overflow 'jpeg_qual' 3 <= 3 Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] benq: fix indentationMauro Carvalho Chehab
drivers/media/usb/gspca/benq.c:239 sd_isoc_irq() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-30[media] go7007: don't use vb before test if it is not NULLMauro Carvalho Chehab
As reported by smatch: drivers/media/usb/go7007/go7007-driver.c:452 frame_boundary() warn: variable dereferenced before check 'vb' (see line 449) Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-21Merge branch 'patchwork' into v4l_for_linusMauro Carvalho Chehab
* patchwork: (404 commits) [media] uvcvideo: add support for VIDIOC_QUERY_EXT_CTRL [media] uvcvideo: fix cropcap v4l2-compliance failure [media] media: omap3isp: remove unused clkdev [media] coda: Add tracing support [media] coda: drop dma_sync_single_for_device in coda_bitstream_queue [media] coda: fix fill bitstream errors in nonstreaming case [media] coda: call SEQ_END when the first queue is stopped [media] coda: fail to start streaming if userspace set invalid formats [media] coda: remove duplicate error messages for buffer allocations [media] coda: move parameter buffer in together with context buffer allocation [media] coda: allocate bitstream buffer from REQBUFS, size depends on the format [media] coda: allocate per-context buffers from REQBUFS [media] coda: use strlcpy instead of snprintf [media] coda: bitstream payload is unsigned [media] coda: fix double call to debugfs_remove [media] coda: check kasprintf return value in coda_open [media] coda: bitrate can only be set in kbps steps [media] v4l2-mem2mem: no need to initialize b in v4l2_m2m_next_buf and v4l2_m2m_buf_remove [media] s5p-mfc: set allow_zero_bytesused flag for vb2_queue_init [media] coda: set allow_zero_bytesused flag for vb2_queue_init ...
2015-04-10[media] uvcvideo: add support for VIDIOC_QUERY_EXT_CTRLHans Verkuil
Add support for the new VIDIOC_QUERY_EXT_CTRL ioctl. Since uvc doesn't use the control framework, support for this ioctl isn't automatic. This is makes v4l2-compliance happy as well. [Added blank lines for improved readability] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-10[media] uvcvideo: fix cropcap v4l2-compliance failureHans Verkuil
The v4l2-compliance tool expects that if VIDIOC_CROPCAP is defined, then VIDIOC_G_SELECTION for TGT_CROP_BOUNDS/DEFAULT is also defined (or COMPOSE in the case of an output device). In fact, all that a driver has to do to implement cropcap is to support those two targets since the v4l2 core will implement cropcap and fill in the pixelaspect to 1/1 by default. Implementing cropcap is only needed if the pixelaspect isn't square. So implement g_selection instead of cropcap in uvc to fix the v4l2-compliance failure. [Added blank lines for improved readability] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08[media] WinFast DTV2000 DS PlusChristian Dale
Add Leadtek WinFast DTV2000DS Plus device based on Realtek RTL2832U. I have not tested the remote, but it is the Y04G0051 model. Signed-off-by: Christian Dale <kernel@techmunk.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08[media] rtl28xxu: add support for Turbo-X DTT2000Dimitris Lampridis
ID 1b80:d3a4 Afatech Simply added the PID (0xd3a4) of this DVB-T USB device to the list of rtl2832u-supported devices. VID (0x1b80) is same as KWORLD2. Tested and verified to work in amd64 with kernels 3.13.0 and 3.16.0. Signed-off-by: Dimitris Lampridis <dlampridis@logikonlabs.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08[media] cxusb: Use enum to represent table offsets rather than hard-coding ↵David Howells
numbers Use enum to represent table offsets rather than hard-coding numbers to avoid problems with the numbers becoming out of sync with the table. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08[media] dib0700: remove unused macrosLuis de Bethencourt
Remove unused macros RC_REPEAT_DELAY and RC_REPEAT_DELAY_V1_20 Signed-off-by: Luis de Bethencourt <luis.bg@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08[media] dvb-usb: fix spaces after commasLuis de Bethencourt
Fixing a few checkpatch errors of type: space required after that ',' Signed-off-by: Luis de Bethencourt <luis.bg@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08[media] mn88472: add ts mode and ts clock to driverBenjamin Larsson
Signed-off-by: Benjamin Larsson <benjamin@southpole.se> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08[media] uvc: embed video_deviceHans Verkuil
Embed the video_device struct to simplify the error handling and in order to (eventually) get rid of video_device_alloc/release. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-08[media] em28xx: embed video_deviceHans Verkuil
Embed the video_device struct to simplify the error handling and in order to (eventually) get rid of video_device_alloc/release. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-03[media] usbvision: fix leak of usb_dev on failure paths in usbvision_probe()Alexey Khoroshilov
There is no usb_put_dev() on failure paths in usbvision_probe(). 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 <mchehab@osg.samsung.com>
2015-04-03[media] cx231xx: embed video_deviceHans Verkuil
Embed the video_device struct to simplify the error handling and in order to (eventually) get rid of video_device_alloc/release. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-03[media] usbvision: embed video_deviceHans Verkuil
Embed the video_device struct to simplify the error handling and in order to (eventually) get rid of video_device_alloc/release. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-03[media] tm6000: embed video_deviceHans Verkuil
Embed the video_device struct to simplify the error handling and in order to (eventually) get rid of video_device_alloc/release. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-03[media] hdpvr: embed video_deviceHans Verkuil
Embed the video_device struct to simplify the error handling and in order to (eventually) get rid of video_device_alloc/release. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-03[media] dw2102: switch ts2022 to ts2020 driverAntti Palosaari
Change ts2022 driver to ts2020 driver. ts2020 driver supports both tuner chip models. That affects TechnoTrend TT-connect S2-4600 DVB-S/S2 device, which Olli just added. Cc: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-03[media] dvbsky: switch ts2022 to ts2020 driverAntti Palosaari
Change ts2022 driver to ts2020 driver. ts2020 driver supports both tuner chip models. Cc: Nibble Max <nibble.max@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-03[media] em28xx: switch PCTV 461e to ts2020 driverAntti Palosaari
Change ts2022 driver to ts2020 driver as ts2020 driver now supports both models. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-03[media] dw2102: TechnoTrend TT-connect S2-4600 DVB-S/S2 tunerOlli Salonen
TechnoTrend TT-connect S2-4600 is a USB2.0 DVB-S/S2 tuner using the popular Montage M88DS3103/M88TS2022 demod/tuner. The demodulator needs a firmware. Antti posted a firmware when releasing support for PCTV 461e, available here: http://palosaari.fi/linux/v4l-dvb/firmware/M88DS3103/ Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-03[media] dw2102: store i2c client for tuner into dw2102_stateOlli Salonen
Prepare the dw2102 driver for tuner drivers that are implemented as I2C drivers (such as m88ts2022). The I2C client is stored in to the state and released at disconnect. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-03[media] dw2102: combine su3000_state and s6x0_state into dw2102_stateOlli Salonen
Two separate state structs are defined for different devices inside the dw2102. Combine them, as both only contain one element. This will also make it easier to further cleanup the driver. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-03[media] rtl28xxu: lower the rc poll time to mitigate i2c transfer errorsBenjamin Larsson
The Astrometa device has issues with i2c transfers. Lowering the poll time somehow makes these errors disappear. Signed-off-by: Benjamin Larsson <benjamin@southpole.se> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] V4L: remove clock name from v4l2_clk APIGuennadi Liakhovetski
All uses of the v4l2_clk API so far only register one clock with a fixed name. This allows us to get rid of it, which also will make CCF and DT integration easier. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Josh Wu <josh.wu@atmel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] au0828: fix broken streamingHans Verkuil
Commit c5036d61e0bed3f4f51391a145638b426825e69c ("media: au0828: drop vbi_buffer_filled() and re-use buffer_filled()") broke video and vbi streaming. The vb2_buffer struct was copied instead of taking a pointer to it, but vb2_buffer_done() needs the real object, not a copy, since it is hooking the buffer into a different list. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] rtl28xxu: return success for unimplemented FE callbackAntti Palosaari
Return success for FE callback on case we don't have any special implementation. fc0013 tuner driver calls that callback in order to switch antenna input, even we don't provide antenna switch. Returning error caused fc0013 driver given up tuning. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] cx231xx: fix compiler warningsHans Verkuil
If CONFIG_VIDEO_CX231XX_RC is undefined, then these compiler warnings are generated: In file included from drivers/media/usb/cx231xx/cx231xx-cards.c:23:0: drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_release_resources’: drivers/media/usb/cx231xx/cx231xx.h:982:30: warning: statement with no effect [-Wunused-value] #define cx231xx_ir_exit(dev) (0) ^ drivers/media/usb/cx231xx/cx231xx-cards.c:1158:2: note: in expansion of macro ‘cx231xx_ir_exit’ cx231xx_ir_exit(dev); ^ drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_init_dev’: drivers/media/usb/cx231xx/cx231xx.h:981:30: warning: statement with no effect [-Wunused-value] #define cx231xx_ir_init(dev) (0) ^ drivers/media/usb/cx231xx/cx231xx-cards.c:1351:2: note: in expansion of macro ‘cx231xx_ir_init’ cx231xx_ir_init(dev); ^ drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_usb_probe’: drivers/media/usb/cx231xx/cx231xx.h:982:30: warning: statement with no effect [-Wunused-value] #define cx231xx_ir_exit(dev) (0) ^ drivers/media/usb/cx231xx/cx231xx-cards.c:1705:2: note: in expansion of macro ‘cx231xx_ir_exit’ cx231xx_ir_exit(dev); ^ drivers/media/usb/cx231xx/cx231xx-cards.c: In function ‘cx231xx_usb_disconnect’: drivers/media/usb/cx231xx/cx231xx.h:982:30: warning: statement with no effect [-Wunused-value] #define cx231xx_ir_exit(dev) (0) ^ drivers/media/usb/cx231xx/cx231xx-cards.c:1754:3: note: in expansion of macro ‘cx231xx_ir_exit’ cx231xx_ir_exit(dev); ^ Fix by using static inlines instead of defines. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] stk1160: Make sure current buffer is releasedEzequiel Garcia
The available (i.e. not used) buffers are returned by stk1160_clear_queue(), on the stop_streaming() path. However, this is insufficient and the current buffer must be released as well. Fix it. Cc: stable@vger.kernel.org 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>
2015-04-02[media] uvcvideo: Validate index during step-wise frame intervals enumerationLaurent Pinchart
Frame intervals exposed as an interval and step (so-called step-wise) are restricted by the V4L2 API to a single enumeration entry. Return an error when the index is not zero. Reported-by: Alexey Smirnoff <fling@member.fsf.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [mchehab@osg.samsung.com: add a missing collon at the end of the return statement, in order to avoid compilation breakage] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] uvcvideo: Recognize the Tasco USB microscopeLaurent Pinchart
The device is based on an Aveo chipset, implements UVC but advertises a vendor-specific class on all interfaces. Support it by listing the USB VID:PID explicitly. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-04-02[media] uvcvideo: Don't call vb2 mmap and get_unmapped_area with queue lock heldLaurent Pinchart
videobuf2 has long been subject to AB-BA style deadlocks due to the queue lock and mmap_sem being taken in different orders for the mmap and get_unmapped_area operations. The problem has been fixed by making those two operations callable without taking the queue lock, using an mmap_lock internal to videobuf2. The uvcvideo driver still calls the mmap and get_unmapped_area operations with the queue lock held, resulting in a potential deadlock. As the operations can now be called without locking the queue, fix it. Reported-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-03[media] Basic support for the Elgato EyeTV Hybrid INT 2008 USB StickGilles Risch
This patch will add basic support for the Elgato EyeTV Hybrid INT 2008 USB Stick. Signed-off-by: Gilles Risch <gilles.risch@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-03[media] v4l2: remove unused including <linux/version.h>Wei Yongjun
Remove including <linux/version.h> that don't need it. 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 <mchehab@osg.samsung.com>
2015-03-03[media] media: au0828 - embed vdev and vbi_dev structs in au0828_devShuah Khan
Embed video_device structs vdev and vbi_dev in au0828_dev. With this change, dynamic allocation and error path logic in au0828_analog_register() is removed as it doesn't need to allocate and handle allocation errors. Unregister path doesn't need to free the now static video_device structures, hence, changed video_device.release in au0828_video_template to point to video_device_release_empty. Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-03[media] media: au0828: drop vbi_buffer_filled() and re-use buffer_filled()Lad, Prabhakar
The vbi_buffer_filled() and buffer_filled() did the same functionality except for incrementing the buffer sequence, this patch drops the vbi_buffer_filled() and re-uses buffer_filled() for vbi buffers as well by adding the check for vb2-queue type while incrementing the sequence numbers. Along side this patch aligns the input parameters of buffer_filled() function appropriately. Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-03[media] cx231xx: Hauppauge HVR-955Q ATSC/QAM tunerOlli Salonen
Hauppauge HVR-955Q is a ATSC/QAM USB tuner with LGDT3306A demodulator and SiLabs Si2157-A30 tuner. Only digital TV has been tested (both ATSC and QAM256). Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-03[media] media: fix gspca drivers build dependenciesRandy Dunlap
Several (15) drivers in media/usb/gspca use IF_ENABLED(CONFIG_INPUT) to decide if they should call input* interfaces, but those drivers do not build successfully when CONFIG_INPUT=m and the gspca drivers are builtin (=y). Making USB_GSPCA depend on INPUT || INPUT=n fixes the build dependencies and allows all of them to build cleanly. Fixes these build errors (selections, not all are listed): drivers/built-in.o: In function `gspca_disconnect': (.text+0x32ed0f): undefined reference to `input_unregister_device' drivers/built-in.o: In function `sd_isoc_irq': konica.c:(.text+0x333098): undefined reference to `input_event' konica.c:(.text+0x3330ab): undefined reference to `input_event' drivers/built-in.o: In function `sd_stopN': konica.c:(.text+0x3338d3): undefined reference to `input_event' konica.c:(.text+0x3338e5): undefined reference to `input_event' drivers/built-in.o: In function `ov51x_handle_button': ov519.c:(.text+0x335ddb): undefined reference to `input_event' drivers/built-in.o:ov519.c:(.text+0x335ded): more undefined references to `input_event' follow pac7302.c:(.text+0x336ea1): undefined reference to `input_event' pac7302.c:(.text+0x336eb3): undefined reference to `input_event' drivers/built-in.o: In function `sd_pkt_scan': spca561.c:(.text+0x338fd8): undefined reference to `input_event' drivers/built-in.o:spca561.c:(.text+0x338feb): more undefined references to `input_event' follow t613.c:(.text+0x33a6fd): undefined reference to `input_event' drivers/built-in.o:t613.c:(.text+0x33a70f): more undefined references to `input_event' follow Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-02[media] pvrusb2: use struct v4l2_fhHans Verkuil
By using struct v4l2_fh both the prio handling and the linked list implementation in pvrusb2 can be removed since both are now done in the v4l2 core if you use struct v4l2_fh. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Tested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-02[media] pvrusb2: replace .ioctl by .unlocked_ioctlHans Verkuil
As far as I can tell pvrusb2 does its own locking, so there is no need to use .ioctl. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-02[media] au0828: Delete unnecessary checks before the function call ↵Markus Elfring
"video_unregister_device" The video_unregister_device() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. 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>
2015-03-02[media] stk-webcam: Delete an unnecessary check before the function call "vfree"Markus Elfring
The vfree() function performs also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. 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>
2015-03-02[media] fixp-arith: replace sin/cos table by a better precision oneMauro Carvalho Chehab
The cos table used at fixp-arith.h has only 8 bits of precision. That causes problems if it is reused on other drivers. As some media drivers require a higher precision sin/cos implementation, replace the current implementation by one that will provide 32 bits precision. The values generated by the new implementation matches the 32 bit precision of glibc's sin for an angle measured in integer degrees. It also provides support for fractional angles via linear interpolation. On experimental calculus, when used a table with a 0.001 degree angle, the maximum error for sin is 0.000038, which is likely good enough for practical purposes. There are some logic there that seems to be specific to the usage inside ff-memless.c. Move those logic to there, as they're not needed elsewhere. Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Prashant Laddha <prladdha@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-02[media] cx231xx: drop condition with no effectNicholas Mc Guire
The if and the else code are identical - so the condition has no effect on the effective code. This patch removes the condition and the duplicated code. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-02[media] siano: avoid a linkedit error if !MCMauro Carvalho Chehab
If the media controller (MC) is not enabled, it will compile fine, but will fail at the linkedition: ERROR: "media_device_unregister" [drivers/media/usb/siano/smsusb.ko] undefined! Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-03-02[media] use a function for DVB media controller registerMauro Carvalho Chehab
This is really a simple function, but using it avoids to have if's inside the drivers. Also, the kABI becomes a little more clearer. This shouldn't generate any overhead, and the type check will happen when compiling with MC DVB enabled. So, let's do it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>