summaryrefslogtreecommitdiff
path: root/drivers/media/usb
AgeCommit message (Collapse)Author
2015-07-03[media] media: Fix regression in some more dib0700 based devicesThomas Reitmayr
[ Upstream commit e989a73ebd09d22c22ead51fa363a2f56f70f28a ] Fix an oops during device initialization by correctly setting size_of_priv instead of leaving it 0. The regression was introduced by 8abe4a0a3f6d4217b16a ("[media] dib7000: export just one symbol") and only fixed for one type of dib0700 based devices in 9e334c75642b6e5bfb95 ("[media] Fix regression in some dib0700 based devices"). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=92301 Fixes: 8abe4a0a3f6d4217b16a ("[media] dib7000: export just one symbol") Cc: stable@vger.kernel.org # for version 3.17+ Signed-off-by: Thomas Reitmayr <treitmayr@devbase.at> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2015-07-03[media] rc-core: fix dib0700 scancode generation for RC5David Härdeman
[ Upstream commit 4d298b8539ed59f1d69d3aa6e41a2c4908137612 ] commit af3a4a9bbeb0 ("[media] dib0700: NEC scancode cleanup") cleaned up the NEC scancode logic but overlooked the RC5 case. This patch brings the RC5 case in line with the NEC code and makes the struct self-documenting. Signed-off-by: David Härdeman <david@hardeman.nu> Reported-by: David Cimbůrek <david.cimburek@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2015-05-17[media] stk1160: Make sure current buffer is releasedEzequiel Garcia
[ Upstream commit aeff09276748b66072f2db2e668cec955cf41959 ] 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> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2015-03-06em28xx-audio: fix missing newlines, againRussell King
commit fbaa48d1853002c2e7bcf12c1fdc0f6fb16d1525 upstream. Inspection shows that newlines are missing from several kernel messages in em28xx-audio. Fix these. Fixes: 6d746f91f230 ("[media] em28xx-audio: implement em28xx_ops: suspend/resume hooks") Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06em28xx-dvb: fix missing newlinesRussell King
commit a084c57fc1ccd24ef8e6ca41e75afa745d5dbb98 upstream. Inspection shows that newlines are missing from several kernel messages in em28xx-dvb. Fix these. Fixes: ca2b46dacbf5 ("[media] em28xx-dvb: implement em28xx_ops: suspend/resume hooks") Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06em28xx-video: fix missing newlinesRussell King
commit 32e63f0368ed16e5ac417dc0bc2a5f8acbfb1511 upstream. Inspection shows that newlines are missing from several kernel messages in em28xx-video. Fix these. Fixes: a61f68119af3 ("[media] em28xx-video: implement em28xx_ops: suspend/resume hooks") Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06em28xx-core: fix missing newlinesRussell King
commit 522adc7c1f70d302155bb07f7fdf5a7fe4ff9094 upstream. Inspection shows that newlines are missing from several kernel messages in em28xx-core. Fix these. Fixes: 9c669b731470 ("[media] em28xx: add suspend/resume to em28xx_ops") Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06em28xx-audio: fix missing newlinesRussell King
commit 7818b0aab87b680fb10f68eccebeeb6cd8283c73 upstream. Inspection shows that newlines are missing from several kernel messages in em28xx-audio. Fix these. Fixes: 1b3fd2d34266 ("[media] em28xx-audio: don't hardcode audio URB calculus") Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06em28xx-input: fix missing newlinesRussell King
commit ebfd59cf549899a166d595bf1eab7eec3299ebe7 upstream. Inspection shows that newlines are missing from several kernel messages in em28xx-input. Fix these. Fixes: 5025076aadfe ("[media] em28xx-input: implement em28xx_ops: suspend/resume hooks") Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06em28xx: ensure "closing" messages terminate with a newlineRussell King
commit 0418ca6073478f54f1da2e4013fa50d36838de75 upstream. The lockdep splat addressed in a previous commit revealed that at least one message in em28xx-input.c was missing a new line: em28178 #0: Closing input extensionINFO: trying to register non-static key. Further inspection shows several other messages also miss a new line. These will be fixed in a subsequent patch. Fixes: aa929ad783c0 ("[media] em28xx: print a message at disconnect") Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in interrupt urbMalcolm Priestley
commit 15e1ce33182d1d5dbd8efe8d382b9352dc857527 upstream. A quirk of some older firmwares that report endpoint pipe type as PIPE_BULK but the endpoint otheriwse functions as interrupt. Check if usb_endpoint_type is USB_ENDPOINT_XFER_BULK and set as usb_rcvbulkpipe. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06lmedm04: Increase Interupt due time to 200 msecMalcolm Priestley
commit cfcd7b825892cb498c6bcb13257f2141f7eacb76 upstream. Ocassionally the device fails to report back an interrupt urb status which results in false no lock trigger on the RS2000 demodulator. Increase time from 60 msecs to 200 msecs. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-27uvcvideo: Fix destruction order in uvc_delete()Takashi Iwai
commit 2228d80dd05a4fc5a410fde847677b8fb3eb23d7 upstream. We've got a bug report at disconnecting a Webcam, where the kernel spews warnings like below: WARNING: CPU: 0 PID: 8385 at ../fs/sysfs/group.c:219 sysfs_remove_group+0x87/0x90() sysfs group c0b2350c not found for kobject 'event3' CPU: 0 PID: 8385 Comm: queue2:src Not tainted 3.16.2-1.gdcee397-default #1 Hardware name: ASUSTeK Computer INC. A7N8X-E/A7N8X-E, BIOS ASUS A7N8X-E Deluxe ACPI BIOS Rev 1013 11/12/2004 c08d0705 ddc75cbc c0718c5b ddc75ccc c024b654 c08c6d44 ddc75ce8 000020c1 c08d0705 000000db c03d1ec7 c03d1ec7 00000009 00000000 c0b2350c d62c9064 ddc75cd4 c024b6a3 00000009 ddc75ccc c08c6d44 ddc75ce8 ddc75cfc c03d1ec7 Call Trace: [<c0205ba6>] try_stack_unwind+0x156/0x170 [<c02046f3>] dump_trace+0x53/0x180 [<c0205c06>] show_trace_log_lvl+0x46/0x50 [<c0204871>] show_stack_log_lvl+0x51/0xe0 [<c0205c67>] show_stack+0x27/0x50 [<c0718c5b>] dump_stack+0x3e/0x4e [<c024b654>] warn_slowpath_common+0x84/0xa0 [<c024b6a3>] warn_slowpath_fmt+0x33/0x40 [<c03d1ec7>] sysfs_remove_group+0x87/0x90 [<c05a2c54>] device_del+0x34/0x180 [<c05e3989>] evdev_disconnect+0x19/0x50 [<c05e06fa>] __input_unregister_device+0x9a/0x140 [<c05e0845>] input_unregister_device+0x45/0x80 [<f854b1d6>] uvc_delete+0x26/0x110 [uvcvideo] [<f84d66f8>] v4l2_device_release+0x98/0xc0 [videodev] [<c05a25bb>] device_release+0x2b/0x90 [<c04ad8bf>] kobject_cleanup+0x6f/0x1a0 [<f84d5453>] v4l2_release+0x43/0x70 [videodev] [<c0372f31>] __fput+0xb1/0x1b0 [<c02650c1>] task_work_run+0x91/0xb0 [<c024d845>] do_exit+0x265/0x910 [<c024df64>] do_group_exit+0x34/0xa0 [<c025a76f>] get_signal_to_deliver+0x17f/0x590 [<c0201b6a>] do_signal+0x3a/0x960 [<c02024f7>] do_notify_resume+0x67/0x90 [<c071ebb5>] work_notifysig+0x30/0x3b [<b7739e60>] 0xb7739e5f ---[ end trace b1e56095a485b631 ]--- The cause is that uvc_status_cleanup() is called after usb_put_*() in uvc_delete(). usb_put_*() removes the sysfs parent and eventually removes the children recursively, so the later device_del() can't find its sysfs. The fix is simply rearrange the call orders in uvc_delete() so that the child is removed before the parent. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=897736 Reported-and-tested-by: Martin Pluskal <mpluskal@suse.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-27sound: simplify au0828 quirk tableMauro Carvalho Chehab
commit 5d1f00a20d2d56ed480e64e938a2391353ee565b upstream. Add a macro to simplify au0828 quirk table. That makes easier to check it against the USB IDs at drivers/media/usb/au0828/au0828-cards.c. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-27af9005: fix kernel panic on init if compiled without IRFrank Schaefer
commit 2279948735609d0d17d7384e776b674619f792ef upstream. This patches fixes an ancient bug in the dvb_usb_af9005 driver, which has been reported at least in the following threads: https://lkml.org/lkml/2009/2/4/350 https://lkml.org/lkml/2014/9/18/558 If the driver is compiled in without any IR support (neither DVB_USB_AF9005_REMOTE nor custom symbols), the symbol_request calls in af9005_usb_module_init() return pointers != NULL although the IR symbols are not available. This leads to the following oops: ... [ 8.529751] usbcore: registered new interface driver dvb_usb_af9005 [ 8.531584] BUG: unable to handle kernel paging request at 02e00000 [ 8.533385] IP: [<7d9d67c6>] af9005_usb_module_init+0x6b/0x9d [ 8.535613] *pde = 00000000 [ 8.536416] Oops: 0000 [#1] PREEMPT PREEMPT DEBUG_PAGEALLOCDEBUG_PAGEALLOC [ 8.537863] CPU: 0 PID: 1 Comm: swapper Not tainted 3.15.0-rc6-00151-ga5c075c #1 [ 8.539827] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014 [ 8.541519] task: 89c9a670 ti: 89c9c000 task.ti: 89c9c000 [ 8.541519] EIP: 0060:[<7d9d67c6>] EFLAGS: 00010206 CPU: 0 [ 8.541519] EIP is at af9005_usb_module_init+0x6b/0x9d [ 8.541519] EAX: 02e00000 EBX: 00000000 ECX: 00000006 EDX: 00000000 [ 8.541519] ESI: 00000000 EDI: 7da33ec8 EBP: 89c9df30 ESP: 89c9df2c [ 8.541519] DS: 007b ES: 007b FS: 0000 GS: 00e0 SS: 0068 [ 8.541519] CR0: 8005003b CR2: 02e00000 CR3: 05a54000 CR4: 00000690 [ 8.541519] Stack: [ 8.541519] 7d9d675b 89c9df90 7d992a49 7d7d5914 89c9df4c 7be3a800 7d08c58c 8a4c3968 [ 8.541519] 89c9df80 7be3a966 00000192 00000006 00000006 7d7d3ff4 8a4c397a 00000200 [ 8.541519] 7d6b1280 8a4c3979 00000006 000009a6 7da32db8 b13eec81 00000006 000009a6 [ 8.541519] Call Trace: [ 8.541519] [<7d9d675b>] ? ttusb2_driver_init+0x16/0x16 [ 8.541519] [<7d992a49>] do_one_initcall+0x77/0x106 [ 8.541519] [<7be3a800>] ? parameqn+0x2/0x35 [ 8.541519] [<7be3a966>] ? parse_args+0x113/0x25c [ 8.541519] [<7d992bc2>] kernel_init_freeable+0xea/0x167 [ 8.541519] [<7cf01070>] kernel_init+0x8/0xb8 [ 8.541519] [<7cf27ec0>] ret_from_kernel_thread+0x20/0x30 [ 8.541519] [<7cf01068>] ? rest_init+0x10c/0x10c [ 8.541519] Code: 08 c2 c7 05 44 ed f9 7d 00 00 e0 02 c7 05 40 ed f9 7d 00 00 e0 02 c7 05 3c ed f9 7d 00 00 e0 02 75 1f b8 00 00 e0 02 85 c0 74 16 <a1> 00 00 e0 02 c7 05 54 84 8e 7d 00 00 e0 02 a3 58 84 8e 7d eb [ 8.541519] EIP: [<7d9d67c6>] af9005_usb_module_init+0x6b/0x9d SS:ESP 0068:89c9df2c [ 8.541519] CR2: 0000000002e00000 [ 8.541519] ---[ end trace 768b6faf51370fc7 ]--- The prefered fix would be to convert the whole IR code to use the kernel IR infrastructure (which wasn't available at the time this driver had been created). Until anyone who still has this old hardware steps up an does the conversion, fix it by not calling the symbol_request calls if the driver is compiled in without the default IR symbols (CONFIG_DVB_USB_AF9005_REMOTE). Due to the IR related pointers beeing NULL by default, IR support will then be disabled. The downside of this solution is, that it will no longer be possible to compile custom IR symbols (not using CONFIG_DVB_USB_AF9005_REMOTE) in. Please note that this patch has NOT been tested with all possible cases. I don't have the hardware and could only verify that it fixes the reported bug. Reported-by: Fengguag Wu <fengguang.wu@intel.com> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Acked-by: Luca Olivetti <luca@ventoso.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-21[media] s2255drv: fix payload size for JPG, MJPEGsensoray-dev
length is the size of the buffer, not the payload. That's set using vb2_set_plane_payload(). Signed-off-by: Dean Anderson <linux-dev@sensoray.com> Cc: <stable@vger.kernel.org> # for v3.15 and up Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-24[media] usbvision-video: two use after freesDan Carpenter
The lock has been freed in usbvision_release() so there is no need to call mutex_unlock() here. 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>
2014-10-24[media] em28xx-input: NULL dereference on errorDan Carpenter
We call "kfree(ir->i2c_client);" in the error handling and that doesn't work if "ir" is NULL. Fixes: 78e719a5f30b ('[media] em28xx-input: i2c IR decoders: improve i2c_client handling') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-21[media] hackrf: harmless off by one in debug codeDan Carpenter
My static checker complains that "i" could be one element beyond the end of the array. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-21[media] v4l: uvcvideo: Fix buffer completion size checkLaurent Pinchart
Commit e93e7fd9f5a3fffec7792dbcc4c3574653effda7 ("v4l2: uvcvideo: Allow using larger buffers") reworked the buffer size sanity check at buffer completion time to use the frame size instead of the allocated buffer size. However, it introduced two bugs in doing so: - it assigned the allocated buffer size to the frame_size field, instead of assigning the correct frame size - it performed the assignment in the S_FMT handler, resulting in the frame_size field being uninitialized if the userspace application doesn't call S_FMT. Fix both issues by removing the frame_size field and validating the buffer size against the UVC video control dwMaxFrameSize. Fixes: e93e7fd9f5a3 ("v4l2: uvcvideo: Allow using larger buffers") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-21[media] em28xx: fix uninitialized variable warningHans Verkuil
Fix this daily build warning: In file included from build/media_build/v4l/em28xx-core.c:35:0: build/media_build/v4l/em28xx-core.c: In function 'em28xx_audio_setup': build/media_build/v4l/em28xx.h:798:2: warning: 'vid' may be used uninitialized in this function [-Wmaybe-uninitialized] printk(KERN_INFO "%s: "fmt,\ ^ build/media_build/v4l/em28xx-core.c:507:6: note: 'vid' was declared here u32 vid; ^ As far as I can tell 'vid' can not really be used uninitialized here, but the code is sufficiently complex that apparently gcc can't figure that out. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-21[media] anysee: make sure loading modules is constKees Cook
Make sure that loaded modules are const char strings so we don't load arbitrary modules in the future, nor allow for format string leaks in the module request call. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-21[media] af9035: make sure loading modules is constKees Cook
Make sure that loaded modules are const char strings so we don't load arbitrary modules in the future, nor allow for format string leaks in the module request call. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-10-10Merge tag 'media/v3.18-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - new IR driver: hix5hd2-ir - the virtual test driver (vivi) was replaced by vivid, with has an almost complete set of features to emulate most v4l2 devices and properly test all sorts of userspace apps - the as102 driver had several bugs fixed and was properly split into a frontend and a core driver. With that, it got promoted from staging into mainstream - one new CI driver got added for CIMaX SP2/SP2HF (sp2 driver) - one new frontend driver for Toshiba ISDB-T/ISDB-S demod (tc90522) - one new PCI driver for ISDB-T/ISDB-S (pt3 driver) - saa7134 driver got support for go7007-based devices - added a new PCI driver for Techwell 68xx chipsets (tw68) - a new platform driver was added (coda) - new tuner drivers: mxl301rf and qm1d1c0042 - a new DVB USB driver was added for DVBSky S860 & similar devices - added a new SDR driver (hackrf) - usbtv got audio support - several platform drivers are now compiled with COMPILE_TEST - a series of compiler fixup patches, making sparse/spatch happier with the media stuff and removing several warnings, especially on those platform drivers that didn't use to compile on x86 - Support for several new modern devices got added - lots of other fixes, improvements and cleanups * tag 'media/v3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (544 commits) [media] ir-hix5hd2: fix build on c6x arch [media] pt3: fix DTV FE I2C driver load error paths Revert "[media] media: em28xx - remove reset_resume interface" [media] exynos4-is: fix some warnings when compiling on arm64 [media] usb drivers: use %zu instead of %zd [media] pci drivers: use %zu instead of %zd [media] dvb-frontends: use %zu instead of %zd [media] s5p-mfc: Fix several printk warnings [media] s5p_mfc_opr: Fix warnings [media] ti-vpe: Fix typecast [media] s3c-camif: fix dma_addr_t printks [media] s5p_mfc_opr_v6: get rid of warnings when compiled with 64 bits [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64 [media] em28xx: Fix identation [media] drxd: remove a dead code [media] saa7146: remove return after BUG() [media] cx88: remove return after BUG() [media] cx88: fix cards table CodingStyle [media] radio-sf16fmr2: declare some structs as static [media] radio-sf16fmi: declare pnp_attached as static ...
2014-10-09Merge branch 'patchwork' into v4l_for_linusMauro Carvalho Chehab
* patchwork: (544 commits) [media] ir-hix5hd2: fix build on c6x arch [media] pt3: fix DTV FE I2C driver load error paths Revert "[media] media: em28xx - remove reset_resume interface" [media] exynos4-is: fix some warnings when compiling on arm64 [media] usb drivers: use %zu instead of %zd [media] pci drivers: use %zu instead of %zd [media] dvb-frontends: use %zu instead of %zd [media] s5p-mfc: Fix several printk warnings [media] s5p_mfc_opr: Fix warnings [media] ti-vpe: Fix typecast [media] s3c-camif: fix dma_addr_t printks [media] s5p_mfc_opr_v6: get rid of warnings when compiled with 64 bits [media] s5p_mfc_opr_v5: Fix lots of warnings on x86_64 [media] em28xx: Fix identation [media] drxd: remove a dead code [media] saa7146: remove return after BUG() [media] cx88: remove return after BUG() [media] cx88: fix cards table CodingStyle [media] radio-sf16fmr2: declare some structs as static [media] radio-sf16fmi: declare pnp_attached as static ... Conflicts: Documentation/DocBook/media/v4l/compat.xml
2014-10-07Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull "trivial tree" updates from Jiri Kosina: "Usual pile from trivial tree everyone is so eagerly waiting for" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits) Remove MN10300_PROC_MN2WS0038 mei: fix comments treewide: Fix typos in Kconfig kprobes: update jprobe_example.c for do_fork() change Documentation: change "&" to "and" in Documentation/applying-patches.txt Documentation: remove obsolete pcmcia-cs from Changes Documentation: update links in Changes Documentation: Docbook: Fix generated DocBook/kernel-api.xml score: Remove GENERIC_HAS_IOMAP gpio: fix 'CONFIG_GPIO_IRQCHIP' comments tty: doc: Fix grammar in serial/tty dma-debug: modify check_for_stack output treewide: fix errors in printk genirq: fix reference in devm_request_threaded_irq comment treewide: fix synchronize_rcu() in comments checkstack.pl: port to AArch64 doc: queue-sysfs: minor fixes init/do_mounts: better syntax description MIPS: fix comment spelling powerpc/simpleboot: fix comment ...
2014-09-28Revert "[media] media: em28xx - remove reset_resume interface"Mauro Carvalho Chehab
The reset_resume call is needed, otherwise it will break resume on some conditions, depending on the usb ehci/xhci controller. This reverts commit b89193e0b06f44f48e3bf897a5b5cb4a7aff3359. Reported-by: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26Revert "[media] media: em28xx - remove reset_resume interface"Mauro Carvalho Chehab
The reset_resume call is needed, otherwise it will break resume on some conditions, depending on the usb ehci/xhci controller. This reverts commit b89193e0b06f44f48e3bf897a5b5cb4a7aff3359. Reported-by: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] usb drivers: use %zu instead of %zdMauro Carvalho Chehab
size_t is unsigned. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] em28xx: Fix identationMauro Carvalho Chehab
drivers/media/usb/em28xx/em28xx-audio.c:270 snd_em28xx_capture_open() warn: if statement not indented Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] as102: fix endiannes castsMauro Carvalho Chehab
Smatch complains a lot about endiannes issues on as102: drivers/media/usb/as102/as10x_cmd_stream.c:41:47: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd_stream.c:41:47: expected unsigned short [unsigned] [usertype] proc_id drivers/media/usb/as102/as10x_cmd_stream.c:41:47: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd_stream.c:43:43: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd_stream.c:43:43: expected unsigned short [unsigned] [usertype] pid drivers/media/usb/as102/as10x_cmd_stream.c:43:43: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd_stream.c:98:47: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd_stream.c:98:47: expected unsigned short [unsigned] [usertype] proc_id drivers/media/usb/as102/as10x_cmd_stream.c:98:47: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd_stream.c:100:43: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd_stream.c:100:43: expected unsigned short [unsigned] [usertype] pid drivers/media/usb/as102/as10x_cmd_stream.c:100:43: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd_stream.c:142:48: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd_stream.c:142:48: expected unsigned short [unsigned] [usertype] proc_id drivers/media/usb/as102/as10x_cmd_stream.c:142:48: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd_stream.c:185:47: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd_stream.c:185:47: expected unsigned short [unsigned] [usertype] proc_id drivers/media/usb/as102/as10x_cmd_stream.c:185:47: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd_cfg.c:46:40: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd_cfg.c:46:40: expected unsigned short [unsigned] [usertype] proc_id drivers/media/usb/as102/as10x_cmd_cfg.c:46:40: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd_cfg.c:47:36: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd_cfg.c:47:36: expected unsigned short [unsigned] [usertype] tag drivers/media/usb/as102/as10x_cmd_cfg.c:47:36: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd_cfg.c:48:37: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd_cfg.c:48:37: expected unsigned short [unsigned] [usertype] type drivers/media/usb/as102/as10x_cmd_cfg.c:48:37: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd_cfg.c:72:27: warning: cast to restricted __le32 drivers/media/usb/as102/as10x_cmd_cfg.c:102:40: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd_cfg.c:102:40: expected unsigned short [unsigned] [usertype] proc_id drivers/media/usb/as102/as10x_cmd_cfg.c:102:40: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd_cfg.c:104:50: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd_cfg.c:104:50: expected unsigned int [unsigned] [usertype] value32 drivers/media/usb/as102/as10x_cmd_cfg.c:104:50: got restricted __le32 [usertype] <noident> drivers/media/usb/as102/as10x_cmd_cfg.c:105:36: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd_cfg.c:105:36: expected unsigned short [unsigned] [usertype] tag drivers/media/usb/as102/as10x_cmd_cfg.c:105:36: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd_cfg.c:106:37: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd_cfg.c:106:37: expected unsigned short [unsigned] [usertype] type drivers/media/usb/as102/as10x_cmd_cfg.c:106:37: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd_cfg.c:156:48: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd_cfg.c:156:48: expected unsigned short [unsigned] [usertype] proc_id drivers/media/usb/as102/as10x_cmd_cfg.c:156:48: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd_cfg.c:197:14: warning: cast to restricted __le16 drivers/media/usb/as102/as10x_cmd.c:40:40: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd.c:40:40: expected unsigned short [unsigned] [usertype] proc_id drivers/media/usb/as102/as10x_cmd.c:40:40: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd.c:81:41: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd.c:81:41: expected unsigned short [unsigned] [usertype] proc_id drivers/media/usb/as102/as10x_cmd.c:81:41: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd.c:123:41: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd.c:123:41: expected unsigned short [unsigned] [usertype] proc_id drivers/media/usb/as102/as10x_cmd.c:123:41: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd.c:124:43: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd.c:124:43: expected unsigned int [unsigned] [usertype] freq drivers/media/usb/as102/as10x_cmd.c:124:43: got restricted __le32 [usertype] <noident> drivers/media/usb/as102/as10x_cmd.c:178:48: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd.c:178:48: expected unsigned short [unsigned] [usertype] proc_id drivers/media/usb/as102/as10x_cmd.c:178:48: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd.c:202:17: warning: cast to restricted __le16 drivers/media/usb/as102/as10x_cmd.c:203:24: warning: cast to restricted __le16 drivers/media/usb/as102/as10x_cmd.c:204:24: warning: cast to restricted __le16 drivers/media/usb/as102/as10x_cmd.c:230:48: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd.c:230:48: expected unsigned short [unsigned] [usertype] proc_id drivers/media/usb/as102/as10x_cmd.c:230:48: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd.c:262:25: warning: cast to restricted __le16 drivers/media/usb/as102/as10x_cmd.c:289:48: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd.c:289:48: expected unsigned short [unsigned] [usertype] proc_id drivers/media/usb/as102/as10x_cmd.c:289:48: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd.c:313:17: warning: cast to restricted __le32 drivers/media/usb/as102/as10x_cmd.c:315:17: warning: cast to restricted __le32 drivers/media/usb/as102/as10x_cmd.c:317:17: warning: cast to restricted __le32 drivers/media/usb/as102/as10x_cmd.c:319:17: warning: cast to restricted __le16 drivers/media/usb/as102/as10x_cmd.c:349:48: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd.c:349:48: expected unsigned short [unsigned] [usertype] proc_id drivers/media/usb/as102/as10x_cmd.c:349:48: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd.c:387:29: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd.c:387:29: expected unsigned short [unsigned] [usertype] req_id drivers/media/usb/as102/as10x_cmd.c:387:29: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd.c:388:27: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd.c:388:27: expected unsigned short [unsigned] [usertype] prog drivers/media/usb/as102/as10x_cmd.c:388:27: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd.c:389:30: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd.c:389:30: expected unsigned short [unsigned] [usertype] version drivers/media/usb/as102/as10x_cmd.c:389:30: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd.c:390:31: warning: incorrect type in assignment (different base types) drivers/media/usb/as102/as10x_cmd.c:390:31: expected unsigned short [unsigned] [usertype] data_len drivers/media/usb/as102/as10x_cmd.c:390:31: got restricted __le16 [usertype] <noident> drivers/media/usb/as102/as10x_cmd.c:408:14: warning: cast to restricted __le16 This happens because of the command endiannes that are sent/received to the firmware. So, add the correct endiannes tags to the command fields. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-26[media] as102_drv.h: added a missing newlineMauro Carvalho Chehab
drivers/media/usb/as102/as102_drv.h:83:6: warning: no newline at end of file Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] af9035: Add support for IT930x USB bridgeOlli Salonen
Add support for IT930x USB bridge and IT9303 reference design. It is a DVB-T/T2/C tuner with the following components: - IT9303 USB bridge - Si2168-B40 demodulator - Si2147-A30 tuner The IT9303 requires firmware that can be downloaded here: http://trsqr.net/olli/linux/firmwares/it930x/ The Si2168-B40 requires firmware, but the one that is used by PCTV 292e can be used. http://palosaari.fi/linux/v4l-dvb/firmware/Si2168/Si2168-B40/ The Si2147-A30 tuner does not require firmware loading. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] af9035: Add possibility to define which I2C adapter to useOlli Salonen
Some I2C tuner drivers require that the I2C device of the tuner is added to the I2C adapter of the demodulator (Si2168+Si2157 for example). Add possibility to tell af9035_add_i2c_dev which I2C adapter should be used. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] dvbsky: new driver to support DVBSky S860/S960 devicesnibble.max
Support for DVBSky dvb-s2 usb: add dvb-usb-v2 driver for DVBSky dvb-s2 box, no ci support yet. Signed-off-by: Nibble Max <nibble.max@gmail.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] as102: remove some unneeded checksDan Carpenter
We know "ret" is zero so we don't need to test for it. It upsets the static checkers when we test stuff but we know the answer. drivers/media/usb/as102/as102_usb_drv.c:164 as102_send_ep1() warn: we tested 'ret' before and it was 'false' drivers/media/usb/as102/as102_usb_drv.c:189 as102_read_ep2() warn: we tested 'ret' before and it was 'false' Also, we don't need to initialize "ret". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] Media: USB: usbtv: Fixed all coding style issues in usbtv source filesAmber Thrall
Fixed various coding styles, ignoring coding style error on line 5 for all files containing a link that is longer than 80 characters long. Signed-off-by: Amber Thrall <amber.rose.thrall@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] em28xx: remove dead code line from em28xx_audio_setup()Frank Schaefer
Setting the value of the chip config register to EM28XX_CHIPCFG_AC97 in case of a read error is a leftover from the past which is no longer needed. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] em28xx: get rid of field has_audio in struct em28xx_audio_modeFrank Schaefer
Field has_audio in struct em28xx_audio_mode is used together with value EM28XX_NO_AC97 of field ac97 to determine the internal type of audio (none/i2s/ac97). This makes the code difficult to understand: !audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => no audio !audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => BUG audio_mode.has_audio && audio_mode.ac97 == EM28XX_NO_AC97 => AC97 audio audio_mode.has_audio && audio_mode.ac97 != EM28XX_NO_AC97 => I2S audio Simplify the whole thing by introducing an enum em28xx_int_audio_type which describes the internal audio type (none, ac97, i2s) and is hooked directly to the device struct. Then get rid of field has_audio in struct em28xx_audio_mode. A follow-up patch will then remove struct em28xx_ac97_mode and finally the whole struct em28xx_audio_mode. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] em28xx: simplify usb audio class handlingFrank Schaefer
As far as we know devices can either have audio class or vendor class usb interfaces but not both at the same time. Even if both interface types could be provided by devices at the same time, the current code is totally broken for that case. So clean up and simplify the usb audio class handling by replacing fields "has_audio_class" (device has usb audio class compliant interface) and "has_alsa_audio" (device has vendor audio interface) in struct em28xx with a single enum em28xx_usb_audio_type. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] em28xx: remove some unnecessary fields from struct em28xx_audio_modeFrank Schaefer
Fields "ac97_feat", "ac97_vendor_id" and "i2s_samplerates" of struct em28xx_audio_mode are used nowhere, except in function em28xx_audio_setup(). So get rid of them and use local variables instead. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] ttusb-dec: buffer overflow in ioctlDan Carpenter
We need to add a limit check here so we don't overflow the buffer. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] hdpvr: reduce memory footprint when debuggingAndy Shevchenko
There is no need to use hex_dump_to_buffer() since we have a kernel helper to dump up to 64 bytes just via printk(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] em28xx: check if a device has audio earlier"Frank Schaefer
GIT_AUTHOR_DATE=1409603039 This reverts commit b99f0aadd33fad269c8e62b5bec8b5c012a44a56 Author: Mauro Carvalho Chehab <m.chehab@samsung.com> [media] em28xx: check if a device has audio earlier Better to split chipset detection from the audio setup. So, move the detection code to em28xx_init_dev(). It broke analog audio of the Hauppauge winTV HVR 900 and very likely many other em28xx devices. Background: The local variable has_audio in em28xx_usb_probe() describes if the currently probed _usb_interface_ has an audio endpoint, while dev->audio_mode.has_audio means that the _device_ as a whole provides analog audio. Hence it is wrong to set dev->audio_mode.has_audio = has_audio in em28xx_usb_probe(). As result, audio support is no longer detected and configured on devices which have the audio endpoint on a separate interface, because em28xx_audio_setup() bails out immediately at the beginning. Revert the faulty commit to restore the old audio detection procedure, which checks the chip configuration register to determine if the device has analog audio. Cc: <stable@vger.kernel.org> # 3.14 to 3.16 Reported-by: Oravecz Csaba <oravecz@nytud.mta.hu> Tested-by: Oravecz Csaba <oravecz@nytud.mta.hu> Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] cx231xx: Add support for Hauppauge WinTV-HVR-901H (1114xx)Matthias Schwarzott
Add support for: [2040:b139] Hauppauge WinTV HVR-901H (1114xx) According to the inf file, the hardware is similar to [2040:b131] Hauppauge WinTV 930C-HD (model 1114xx) The only difference is the demod Si2161 instead of Si2165 (but both are supported by the si2165 driver). Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-23[media] cx231xx: Add support for Hauppauge WinTV-HVR-900H (111xxx)Matthias Schwarzott
Add support for: [2040:b138] Hauppauge WinTV HVR-900H (111xxx) The hardware is similar to [2040:b130] Hauppauge WinTV 930C-HD (model 1113xx) The only difference is the demod Si2161 instead of Si2165 (but both are supported by the si2165 driver). Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-22[media] dib0700_devices: Use c99 initializers for structures.Mauro Carvalho Chehab
A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @decl@ identifier i1,fld; type T; field list[n] fs; @@ struct i1 { fs T fld; ...}; @bad@ identifier decl.i1,i2; expression e; initializer list[decl.n] is; @@ struct i1 i2 = { is, + .fld = e - e ,...}; // </smpl> Not sure why, but some tables are still using the old way, but at least several of them got fixed. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-22[media] au0828: fill tuner type on all boardsMauro Carvalho Chehab
This is used by the I2C code in order to slow down the speed to 20 kHz on devices with xc5000 or xc5000c. So, it needs to be filled for all devices that use either xc5000 or xc5000c. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-22[media] au0828: explicitly identify boards with analog TVMauro Carvalho Chehab
Right now, the au0828 driver uses .tuner to detect if analog tv is being used or not. By not filling .tuner fields at the board struct, the I2C core can't do decisions based on it. So, add a field to explicitly tell when analog TV is supported. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-09-22[media] au0828-cards: remove a comment about i2c clock stretchingMauro Carvalho Chehab
This comment is already at the au0828-i2c where it belongs. So, remove it from a board's entry. It doesn't make any sense there, as we're setting the clock to 250kHz there, slowing it down only at the au0828-i2c. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>