summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'patchwork' into v4l_for_linusMauro Carvalho Chehab2015-04-2143-647/+1166
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 ...
| * [media] uvcvideo: add support for VIDIOC_QUERY_EXT_CTRLHans Verkuil2015-04-101-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] uvcvideo: fix cropcap v4l2-compliance failureHans Verkuil2015-04-101-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] WinFast DTV2000 DS PlusChristian Dale2015-04-081-0/+2
| | | | | | | | | | | | | | | | | | 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>
| * [media] rtl28xxu: add support for Turbo-X DTT2000Dimitris Lampridis2015-04-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] cxusb: Use enum to represent table offsets rather than hard-coding ↵David Howells2015-04-081-44/+111
| | | | | | | | | | | | | | | | | | | | 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>
| * [media] dib0700: remove unused macrosLuis de Bethencourt2015-04-082-6/+0Star
| | | | | | | | | | | | | | 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>
| * [media] dvb-usb: fix spaces after commasLuis de Bethencourt2015-04-081-8/+9
| | | | | | | | | | | | | | 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>
| * [media] mn88472: add ts mode and ts clock to driverBenjamin Larsson2015-04-081-0/+2
| | | | | | | | | | | | 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>
| * [media] uvc: embed video_deviceHans Verkuil2015-04-083-20/+6Star
| | | | | | | | | | | | | | | | | | 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>
| * [media] em28xx: embed video_deviceHans Verkuil2015-04-082-71/+54Star
| | | | | | | | | | | | | | | | 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>
| * [media] usbvision: fix leak of usb_dev on failure paths in usbvision_probe()Alexey Khoroshilov2015-04-031-7/+17
| | | | | | | | | | | | | | | | | | | | 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>
| * [media] cx231xx: embed video_deviceHans Verkuil2015-04-034-92/+49Star
| | | | | | | | | | | | | | | | 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>
| * [media] usbvision: embed video_deviceHans Verkuil2015-04-032-46/+28Star
| | | | | | | | | | | | | | | | 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>
| * [media] tm6000: embed video_deviceHans Verkuil2015-04-032-46/+17Star
| | | | | | | | | | | | | | | | 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>
| * [media] hdpvr: embed video_deviceHans Verkuil2015-04-033-21/+10Star
| | | | | | | | | | | | | | | | 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>
| * [media] dw2102: switch ts2022 to ts2020 driverAntti Palosaari2015-04-032-9/+6Star
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] dvbsky: switch ts2022 to ts2020 driverAntti Palosaari2015-04-032-16/+12Star
| | | | | | | | | | | | | | | | | | 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>
| * [media] em28xx: switch PCTV 461e to ts2020 driverAntti Palosaari2015-04-032-8/+7Star
| | | | | | | | | | | | | | | | 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>
| * [media] dw2102: TechnoTrend TT-connect S2-4600 DVB-S/S2 tunerOlli Salonen2015-04-032-4/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] dw2102: store i2c client for tuner into dw2102_stateOlli Salonen2015-04-031-1/+18
| | | | | | | | | | | | | | | | | | | | 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>
| * [media] dw2102: combine su3000_state and s6x0_state into dw2102_stateOlli Salonen2015-04-031-10/+7Star
| | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] rtl28xxu: lower the rc poll time to mitigate i2c transfer errorsBenjamin Larsson2015-04-031-1/+1
| | | | | | | | | | | | | | | | | | 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>
| * [media] V4L: remove clock name from v4l2_clk APIGuennadi Liakhovetski2015-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] au0828: fix broken streamingHans Verkuil2015-04-021-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] cx231xx: fix compiler warningsHans Verkuil2015-04-021-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] stk1160: Make sure current buffer is releasedEzequiel Garcia2015-04-021-2/+15
| | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] uvcvideo: Validate index during step-wise frame intervals enumerationLaurent Pinchart2015-04-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] uvcvideo: Recognize the Tasco USB microscopeLaurent Pinchart2015-04-021-0/+8
| | | | | | | | | | | | | | | | | | | | 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>
| * [media] uvcvideo: Don't call vb2 mmap and get_unmapped_area with queue lock heldLaurent Pinchart2015-04-021-13/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] Basic support for the Elgato EyeTV Hybrid INT 2008 USB StickGilles Risch2015-03-033-1/+14
| | | | | | | | | | | | | | | | | | 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>
| * [media] v4l2: remove unused including <linux/version.h>Wei Yongjun2015-03-031-1/+0Star
| | | | | | | | | | | | | | | | 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>
| * [media] media: au0828 - embed vdev and vbi_dev structs in au0828_devShuah Khan2015-03-032-44/+24Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] media: au0828: drop vbi_buffer_filled() and re-use buffer_filled()Lad, Prabhakar2015-03-031-22/+14Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] cx231xx: Hauppauge HVR-955Q ATSC/QAM tunerOlli Salonen2015-03-034-0/+111
| | | | | | | | | | | | | | | | | | 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>
| * [media] pvrusb2: use struct v4l2_fhHans Verkuil2015-03-021-68/+13Star
| | | | | | | | | | | | | | | | | | | | 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>
| * [media] pvrusb2: replace .ioctl by .unlocked_ioctlHans Verkuil2015-03-021-1/+1
| | | | | | | | | | | | | | | | 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>
| * [media] au0828: Delete unnecessary checks before the function call ↵Markus Elfring2015-03-021-6/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | "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>
| * [media] stk-webcam: Delete an unnecessary check before the function call "vfree"Markus Elfring2015-03-021-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] fixp-arith: replace sin/cos table by a better precision oneMauro Carvalho Chehab2015-03-021-8/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] cx231xx: drop condition with no effectNicholas Mc Guire2015-03-021-10/+3Star
| | | | | | | | | | | | | | | | | | | | 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>
| * [media] siano: avoid a linkedit error if !MCMauro Carvalho Chehab2015-03-021-0/+2
| | | | | | | | | | | | | | | | | | | | 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>
| * [media] use a function for DVB media controller registerMauro Carvalho Chehab2015-03-023-5/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [media] dvb: Avoid warnings when compiled without the media controllerMauro Carvalho Chehab2015-03-022-6/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/media/usb/dvb-usb-v2/dvb_usb_core.c: In function ‘dvb_usbv2_adapter_dvb_exit’: drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:531:25: warning: unused variable ‘d’ [-Wunused-variable] struct dvb_usb_device *d = adap_to_d(adap); ^ drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:403:13: warning: ‘dvb_usbv2_media_device_register’ defined but not used [-Wunused-function] static void dvb_usbv2_media_device_register(struct dvb_usb_adapter *adap) drivers/media/usb/dvb-usb/dvb-usb-dvb.c:97:13: warning: ‘dvb_usb_media_device_register’ defined but not used [-Wunused-function] static void dvb_usb_media_device_register(struct dvb_usb_adapter *adap) ^ Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] dvbdev: use adapter arg for dvb_create_media_graph()Mauro Carvalho Chehab2015-03-023-5/+4Star
| | | | | | | | | | | | | | | | | | | | Instead of using media_dev argument for dvb_create_media_graph(), use the adapter. That allows to create a stub for this function, if compiled without DVB support, avoiding to add extra if's at the drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] dvb-usb: create one media_dev per adapterMauro Carvalho Chehab2015-02-262-20/+12Star
| | | | | | | | | | | | | | | | | | | | | | Instead of assuming just one adapter, change the code to store one media controller per adapter. This works fine for dvb-usb, as, on all drivers here, it is not possible to write a media graph that would mix resources between the two different adapters. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] dvb-usb: add support for the media controller at USB driverRafael Lourenço de Lima Chehab2015-02-262-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | Create a struct media_device and add it to the dvb adapter. Please notice that the tuner is not mapped yet by the dvb core. [mchehab@osg.samsung.com: use config option MEDIA_CONTROLLER_DVB] Signed-off-by: Rafael Lourenço de Lima Chehab <chehabrafael@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] dvb-usb-v2: create one media_dev per adapterMauro Carvalho Chehab2015-02-262-17/+14Star
| | | | | | | | | | | | | | | | | | | | | | | | Instead of assuming just one adapter, change the code to store one media controller per adapter. This works fine for dvb-usb, as, on all drivers here, it is not possible to write a media graph that would mix resources between the two different adapters. Acked-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] dvb-usb-v2: add support for the media controller at USB driverRafael Lourenço de Lima Chehab2015-02-262-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | Create a struct media_device and add it to the dvb adapter. Please notice that the tuner is not mapped yet by the dvb core. [mchehab@osg.samsung.com: use config option MEDIA_CONTROLLER_DVB due to a rebase] Signed-off-by: Rafael Lourenço de Lima Chehab <chehabrafael@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
| * [media] siano: register media controller earlierMauro Carvalho Chehab2015-02-261-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | We need to initialize the media controller earlier, as the core will call the smsdvb hotplug during register time. Ok, this is an async operation, so, when the module is not loaded, the media controller works. However, if the module is already loaded, nothing will be registered at the media controller, as it will load too late. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>