summaryrefslogtreecommitdiff
path: root/drivers/media/pci
AgeCommit message (Collapse)Author
2016-01-15Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: floppy: make local variable non-static exynos: fixes an incorrect header guard dt-bindings: fixes some incorrect header guards cpufreq-dt: correct dead link in documentation cpufreq: ARM big LITTLE: correct dead link in documentation treewide: Fix typos in printk Documentation: filesystem: Fix typo in fs/eventfd.c fs/super.c: use && instead of & for warn_on condition Documentation: fix sysfs-ptp lib: scatterlist: fix Kconfig description
2016-01-11[media] dvb: modify core to implement interfaces/entities at MC new genMauro Carvalho Chehab
The Media Controller New Generation redefines the types for both interfaces and entities to be used on DVB. Make the needed changes at the DVB core for all interfaces, entities and data and interface links to appear in the graph. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18[media] cx23885-dvb: move initialization of a8293_pdataMauro Carvalho Chehab
Smatch complains about where the au8293_data is placed: drivers/media/pci/cx23885/cx23885-dvb.c:2174 dvb_register() info: 'a8293_pdata' is not actually initialized (unreached code). It is not actually expected to have such initialization at switch { foo = bar; case: ... } Not really sure how gcc does that, but this is something that I would expect that different compilers would do different things. David Howells checked with the compiler people: it's not really expected to initialise as expected. So, move the initialization outside the switch(), making smatch to shut up one warning. Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18[media] cx23885-dvb: initialize a8293_pdataMauro Carvalho Chehab
As reported by smatch: drivers/media/pci/cx23885/cx23885-dvb.c:2174 dvb_register() info: 'a8293_pdata' is not actually initialized (unreached code). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18[media] media: videobuf2: Move timestamp to vb2_bufferJunghak Sung
Move timestamp from struct vb2_v4l2_buffer to struct vb2_buffer for common use, and change its type to u64 in order to handling y2038 problem. This patch also includes all device drivers' changes related to this restructuring. Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18[media] solo6x10: use v4l2_get_timestamp to fill in buffer timestampHans Verkuil
The timestamp of a v4l2_buffer was advertised as being CLOCK_MONOTONIC, but instead a timestamp from a header field was used. This is inconsistent and not what applications expect. Use v4l2_get_timestamp to properly set the timestamp. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18[media] vb2: drop v4l2_format argument from queue_setupHans Verkuil
The queue_setup callback has a void pointer that is just for V4L2 and is the pointer to the v4l2_format struct that was passed to VIDIOC_CREATE_BUFS. The idea was that drivers would use the information from that struct to buffers suitable for the requested format. After the vb2 split series this pointer is now a void pointer, which is ugly, and the reality is that all existing drivers will effectively just look at the sizeimage field of v4l2_format. To make this more generic the queue_setup callback is changed: the void pointer is dropped, instead if the *num_planes argument is 0, then use the current format size, if it is non-zero, then it contains the number of requested planes and the sizes array contains the requested sizes. If either is unsupported, then return -EINVAL, otherwise use the requested size(s). Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18[media] cx23885: video instead of vbi register usedHans Verkuil
The VID_A_GPCNT register is for video, not vbi. Read from the right register and don't write to the video register. Based upon Devin's initial patch made for an older kernel which I cleaned up and rebased. Thanks to Kernel Labs for that work. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18[media] cx23885: add support for ViewCast 260e and 460eHans Verkuil
Add support for these two new cards. Based upon Devin's initial patch made for an older kernel which I cleaned up and rebased. Thanks to Kernel Labs for that work. Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18[media] ivtv/cx18: fix inverted pixel aspect ratioHans Verkuil
These two drivers reported the pixel aspect ratio the wrong way around. This caused qv4l2 to scale the image incorrectly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-18[media] cx23885: fix format/crop handlingHans Verkuil
While testing the cx23885 driver with various TV standards I found a number of bugs: 1) norm_maxw() returned 768 instead of 720 for PAL formats. This should always be 720, so drop this inline function and just always use 720. 2) cropcap() was missing, so the pixelaspect was never known and qv4l2 would scale the image incorrectly. Add cropcap support. 3) cx23885_set_tvnorm() should just return 0 if the same standard was set again. If another standard is set, then reset the width/height and call set_fmt for the subdevs. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-08treewide: Fix typos in printkMasanari Iida
This patch fix multiple spelling typos found in various part of kernel. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2015-12-04[media] use https://linuxtv.org for LinuxTV URLsMauro Carvalho Chehab
While https was always supported on linuxtv.org, only in Dec 3 2015 the website is using valid certificates. As we're planning to drop pure http support on some future, change all references at the media subsystem to point to the https URL instead. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03[media] dm1105: Remove unnecessary synchronize_irq() before free_irq()Lars-Peter Clausen
Calling synchronize_irq() right before free_irq() is quite useless. On one hand the IRQ can easily fire again before free_irq() is entered, on the other hand free_irq() itself calls synchronize_irq() internally (in a race condition free way), before any state associated with the IRQ is freed. Patch was generated using the following semantic patch: // <smpl> @@ expression irq; @@ -synchronize_irq(irq); free_irq(irq, ...); // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03[media] cx231xx: constify cx2341x_handler_ops structuresJulia Lawall
The cx2341x_handler_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03[media] media, sound: tea575x: constify snd_tea575x_ops structuresJulia Lawall
The snd_tea575x_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-12-03[media] v4l2-dv-timings: add new arg to v4l2_match_dv_timingsHans Verkuil
Add the new match_reduced_fps argument to v4l2_match_dv_timings(). Depending on the situation you may or may not desire to match the reduced_fps flag. Typically only HDMI transmitters will need to check for this flag. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-23Merge tag 'v4.4-rc2' into patchworkMauro Carvalho Chehab
Linux 4.4-rc2 Several PCI media drivers got broken on Kernel 4.4-rc1, due to pci_set_dma_mask() regressions. So, we need to add those fixes back for the media drivers to work again. * tag 'v4.4-rc2': (335 commits) Linux 4.4-rc2 slab/slub: adjust kmem_cache_alloc_bulk API slub: add missing kmem cgroup support to kmem_cache_free_bulk slub: fix kmem cgroup bug in kmem_cache_alloc_bulk slub: optimize bulk slowpath free by detached freelist slub: support for bulk free with SLUB freelists parisc: Map kernel text and data on huge pages parisc: Add Huge Page and HUGETLBFS support parisc: Use long branch to do_syscall_trace_exit parisc: Increase initial kernel mapping to 32MB on 64bit kernel parisc: Initialize the fault vector earlier in the boot process. parisc: Add defines for Huge page support parisc: Drop unused MADV_xxxK_PAGES flags from asm/mman.h serial: export fsl8250_handle_irq serial: 8250_mid: Add missing dependency tty: audit: Fix audit source serial: etraxfs-uart: Fix crash serial: fsl_lpuart: Fix earlycon support bcm63xx_uart: Use the device name when registering an interrupt tty: Fix direct use of tty buffer work ...
2015-11-21various: fix pci_set_dma_mask return value checkingChristoph Hellwig
pci_set_dma_mask returns a negative errno value, not a bool like pci_dma_supported. This of course was just a giant test for attention :) Signed-off-by: Christoph Hellwig <hch@lst.de> Reported-by: Jongman Heo <jongman.heo@samsung.com> Tested-by: Jongman Heo <jongman.heo@samsung.com> [pcnet32] Acked-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: Hans Verkuil <hverkuil@xs4all.nl> Cc: Antti Palosaari <crope@iki.fi> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-19[media] media: cx23885: fix type of allowed_protosHeiner Kallweit
Protocol lists are represented as 64-bit bitmaps, therefore use u64 instead of unsigned long. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-18[media] ddbridge: fix wait_event_timeout return handlingNicholas Mc Guire
API conformance testing for completions with coccinelle spatches are being used to locate API usage inconsistencies: ./drivers/media/pci/ddbridge/ddbridge-core.c:89 incorrect check for negative return Return type of wait_event_timeout is signed long not int and the return type is >=0 always thus the negative check is unnecessary.. As stat is used here exclusively its type is simply changed and the negative return check dropped. Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-17[media] av7110: potential divide by zeroDan Carpenter
"len" comes from dvb_video_ioctl() and there is a possibility that it is zero. We do a divide by len later in the function so that's not ok. 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>
2015-11-17[media] av7110: don't allow negative volumesDan Carpenter
The issue here is that we there is a static checker warning because we have a user controlled volume setting and we cap the upper bound but we allow negative numbers. Negative volumes don't make sense, so let's make these variables unsigned. 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>
2015-11-17[media] include/media: move driver interface headers to a separate dirMauro Carvalho Chehab
Let's not mix headers used by the core with those headers that are needed by some driver-specific interface header. The headers used on drivers were manually moved using: mkdir include/media/drv-intf/ git mv include/media/cx2341x.h include/media/cx25840.h \ include/media/exynos-fimc.h include/media/msp3400.h \ include/media/s3c_camif.h include/media/saa7146.h \ include/media/saa7146_vv.h include/media/sh_mobile_ceu.h \ include/media/sh_mobile_csi2.h include/media/sh_vou.h \ include/media/si476x.h include/media/soc_mediabus.h \ include/media/tea575x.h include/media/drv-intf/ And the references for those headers were corrected using: MAIN_DIR="media/" PREV_DIR="media/" DIRS="drv-intf/" echo "Checking affected files" >&2 for i in $DIRS; do for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do n=`basename $j` git grep -l $n done done|sort|uniq >files && ( echo "Handling files..." >&2; echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\"; ( cd include/$MAIN_DIR; for j in $DIRS; do for i in $(ls $j); do echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\"; done; done; echo "cat > a && mv a \$i; done"; ); echo "Handling documentation..." >&2; echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\"; ( cd include/$MAIN_DIR; for j in $DIRS; do for i in $(ls $j); do echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\"; done; done; echo "cat > a && mv a \$i; done" ); ) >script && . ./script Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
2015-11-17[media] include/media: split I2C headers from V4L2 coreMauro Carvalho Chehab
Currently, include/media is messy, as it contains both the V4L2 core headers and some driver-specific headers on the same place. That makes harder to identify what core headers should be documented and what headers belong to I2C drivers that are included only by bridge/main drivers that would require the functions provided by them. Let's move those i2c specific files to its own subdirectory. The files to move were produced via the following script: mkdir include/media/i2c (cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done) (cd include/media; for i in *.h; do n=`echo $i|sed s/.h$/.c/`; if [ -e ../../drivers/media/*/i2c/$n ]; then echo $i; git mv $i i2c/; fi; done) for i in include/media/*.h; do n=`basename $i`; (for j in $(git grep -l $n); do dirname $j; done)|sort|uniq|grep -ve '^.$' > list; num=$(wc -l list|cut -d' ' -f1); if [ $num == 1 ]; then if [ "`grep i2c list`" != "" ]; then git mv $i include/media/i2c; fi; fi; done And the references corrected via this script: MAIN_DIR="media/" PREV_DIR="media/" DIRS="i2c/" echo "Checking affected files" >&2 for i in $DIRS; do for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do n=`basename $j` git grep -l $n done done|sort|uniq >files && ( echo "Handling files..." >&2; echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\"; ( cd include/$MAIN_DIR; for j in $DIRS; do for i in $(ls $j); do echo "perl -ne 's,(include [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\"; done; done; echo "cat > a && mv a \$i; done"; ); echo "Handling documentation..." >&2; echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\"; ( cd include/$MAIN_DIR; for j in $DIRS; do for i in $(ls $j); do echo " perl -ne 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\"; done; done; echo "cat > a && mv a \$i; done" ); ) >script && . ./script Merged Sakari Ailus patch that moves smiapp.h to include/media/i2c. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
2015-11-16[media] ivtv: avoid going past input/audio arrayMauro Carvalho Chehab
As reported by smatch: drivers/media/pci/ivtv/ivtv-driver.c:832 ivtv_init_struct2() error: buffer overflow 'itv->card->video_inputs' 6 <= 6 Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-16[media] Revert "[media] ivtv: avoid going past input/audio array"Mauro Carvalho Chehab
This patch broke ivtv logic, as reported at https://bugzilla.redhat.com/show_bug.cgi?id=1278942 This reverts commit 09290cc885937cab3b2d60a6d48fe3d2d3e04061. Cc: stable@vger.kernel.org # for v4.1 and upper Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-11netup_unidvb: use pci_set_dma_mask insted of pci_dma_supportedChristoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Sergey Kozlov <serjk@netup.ru> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-11cx23885: use pci_set_dma_mask insted of pci_dma_supportedChristoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: Hans Verkuil <hans.verkuil@cisco.com> Cc: Pawel Osciak <pawel@osciak.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-11cx25821: use pci_set_dma_mask insted of pci_dma_supportedChristoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-11cx88: use pci_set_dma_mask insted of pci_dma_supportedChristoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: Hans Verkuil <hverkuil@xs4all.nl> Cc: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-11saa7134: use pci_set_dma_mask insted of pci_dma_supportedChristoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: Pawel Osciak <pawel@osciak.com> Cc: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-11saa7164: use pci_set_dma_mask insted of pci_dma_supportedChristoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: Hans Verkuil <hverkuil@xs4all.nl> Cc: Steven Toth <stoth@kernellabs.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-11tw68-core: use pci_set_dma_mask insted of pci_dma_supportedChristoph Hellwig
This ensures the dma mask that is supported by the driver is recorded in the device structure. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Hans Verkuil <hverkuil@xs4all.nl> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: Pawel Osciak <pawel@osciak.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-07mm, page_alloc: distinguish between being unable to sleep, unwilling to ↵Mel Gorman
sleep and avoiding waking kswapd __GFP_WAIT has been used to identify atomic context in callers that hold spinlocks or are in interrupts. They are expected to be high priority and have access one of two watermarks lower than "min" which can be referred to as the "atomic reserve". __GFP_HIGH users get access to the first lower watermark and can be called the "high priority reserve". Over time, callers had a requirement to not block when fallback options were available. Some have abused __GFP_WAIT leading to a situation where an optimisitic allocation with a fallback option can access atomic reserves. This patch uses __GFP_ATOMIC to identify callers that are truely atomic, cannot sleep and have no alternative. High priority users continue to use __GFP_HIGH. __GFP_DIRECT_RECLAIM identifies callers that can sleep and are willing to enter direct reclaim. __GFP_KSWAPD_RECLAIM to identify callers that want to wake kswapd for background reclaim. __GFP_WAIT is redefined as a caller that is willing to enter direct reclaim and wake kswapd for background reclaim. This patch then converts a number of sites o __GFP_ATOMIC is used by callers that are high priority and have memory pools for those requests. GFP_ATOMIC uses this flag. o Callers that have a limited mempool to guarantee forward progress clear __GFP_DIRECT_RECLAIM but keep __GFP_KSWAPD_RECLAIM. bio allocations fall into this category where kswapd will still be woken but atomic reserves are not used as there is a one-entry mempool to guarantee progress. o Callers that are checking if they are non-blocking should use the helper gfpflags_allow_blocking() where possible. This is because checking for __GFP_WAIT as was done historically now can trigger false positives. Some exceptions like dm-crypt.c exist where the code intent is clearer if __GFP_DIRECT_RECLAIM is used instead of the helper due to flag manipulations. o Callers that built their own GFP flags instead of starting with GFP_KERNEL and friends now also need to specify __GFP_KSWAPD_RECLAIM. The first key hazard to watch out for is callers that removed __GFP_WAIT and was depending on access to atomic reserves for inconspicuous reasons. In some cases it may be appropriate for them to use __GFP_HIGH. The second key hazard is callers that assembled their own combination of GFP flags instead of starting with something like GFP_KERNEL. They may now wish to specify __GFP_KSWAPD_RECLAIM. It's almost certainly harmless if it's missed in most cases as other activity will wake kswapd. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Christoph Lameter <cl@linux.com> Cc: David Rientjes <rientjes@google.com> Cc: Vitaly Wool <vitalywool@gmail.com> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-05Merge tag 'media/v4.4-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: "Media updates, including: - Lots of improvements at the kABI documentation - Split of Videobuf2 into a common part and a V4L2 specific one - Split of the VB2 tracing events into a separate header file - s5p-mfc got support for Exynos 5433 - v4l2 fixes for 64-bits alignment when running 32 bits userspace on ARM - Added support for SDR radio transmitter at core, vivid and hackrf drivers - Some y2038 fixups - Some improvements at V4L2 colorspace support - saa7164 converted to use the V4L2 core control framework - several new boards additions, cleanups and fixups PS: There are two patches for scripts/kernel-doc that are needed by the documentation patches on Media. Jon is OK on merging those via my tree" * tag 'media/v4.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (146 commits) [media] c8sectpfe: Remove select on CONFIG_FW_LOADER_USER_HELPER_FALLBACK [media] DocBook media: update copyright/version numbers [media] ivtv: Convert to get_user_pages_unlocked() [media] media/v4l2-ctrls: fix setting autocluster to manual with VIDIOC_S_CTRL [media] DocBook media: Fix a typo in encoder cmd [media] DocBook: add SDR specific info to G_MODULATOR / S_MODULATOR [media] DocBook: add SDR specific info to G_TUNER / S_TUNER [media] hackrf: do not set human readable name for formats [media] hackrf: add support for transmitter [media] hackrf: switch to single function which configures everything [media] hackrf: add control for RF amplifier [media] DocBook: add modulator type field [media] v4l: add type field to v4l2_modulator struct [media] DocBook: document SDR transmitter [media] v4l2: add support for SDR transmitter [media] DocBook: document tuner RF gain control [media] v4l2: add RF gain control [media] v4l2: rename V4L2_TUNER_ADC to V4L2_TUNER_SDR [media] media/vivid-osd: fix info leak in ioctl [media] media: videobuf2: Move v4l2-specific stuff to videobuf2-v4l2 ...
2015-10-22[media] netup_unidvb: fix potential crash when spi is NULLAbylay Ospan
Signed-off-by: Abylay Ospan <aospan@netup.ru> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] ivtv: Convert to get_user_pages_unlocked()Jan Kara
Convert ivtv_yuv_prep_user_dma() to use get_user_pages_unlocked() so that we don't unnecessarily leak knowledge about mm locking into drivers code. CC: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-20[media] media: videobuf2: Change queue_setup argumentJunghak Sung
Replace struct v4l2_format * with void * to make queue_setup() for common use. And then, modify all device drivers related with this change. Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> [hans.verkuil@cisco.com: fix missing const in fimc-lite.c] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-06[media] dvb: get rid of enum dmx_successMauro Carvalho Chehab
This enum is not actually used anymore. The only value used from the enum is DMX_OK, passed as a parameter on two callbacks. Yet, this value is not used anywhere. So, just remove it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] netup_unidvb_ci: Fix dereference of noderef expressionMauro Carvalho Chehab
Fix those sparse warnings: drivers/media/pci/netup_unidvb/netup_unidvb_ci.c:150:40: warning: dereference of noderef expression drivers/media/pci/netup_unidvb/netup_unidvb_ci.c:165:31: warning: dereference of noderef expression drivers/media/pci/netup_unidvb/netup_unidvb_ci.c:174:36: warning: dereference of noderef expression drivers/media/pci/netup_unidvb/netup_unidvb_ci.c:189:27: warning: dereference of noderef expression Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] netup_unidvb: remove most of the sparse warningsMauro Carvalho Chehab
There is a mess at the namespace on netup_unidvb: drivers/media/pci/netup_unidvb/netup_unidvb_core.c:192:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_core.c:192:41: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_core.c:192:41: got restricted __le32 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_core.c:194:26: warning: cast removes address space of expression drivers/media/pci/netup_unidvb/netup_unidvb_core.c:194:26: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_core.c:194:26: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_core.c:194:26: got unsigned short [usertype] *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_core.c:196:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_core.c:196:41: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_core.c:196:41: got restricted __le32 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_core.c:198:26: warning: cast removes address space of expression drivers/media/pci/netup_unidvb/netup_unidvb_core.c:198:26: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_core.c:198:26: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_core.c:198:26: got unsigned short [usertype] *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_core.c:210:37: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_core.c:210:37: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_core.c:210:37: got restricted __le32 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_core.c:211:32: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_core.c:211:32: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_core.c:211:32: got restricted __le32 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_core.c:213:33: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_core.c:213:33: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_core.c:213:33: got restricted __le32 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_core.c:528:49: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_core.c:528:49: expected void const volatile [noderef] <asn:2>*src drivers/media/pci/netup_unidvb/netup_unidvb_core.c:528:49: got unsigned char [usertype] * drivers/media/pci/netup_unidvb/netup_unidvb_core.c:541:49: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_core.c:541:49: expected void const volatile [noderef] <asn:2>*src drivers/media/pci/netup_unidvb/netup_unidvb_core.c:541:49: got unsigned char [usertype] * drivers/media/pci/netup_unidvb/netup_unidvb_core.c:647:22: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_core.c:647:22: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_core.c:647:22: got unsigned char [usertype] *addr_virt drivers/media/pci/netup_unidvb/netup_unidvb_core.c:650:22: warning: cast removes address space of expression drivers/media/pci/netup_unidvb/netup_unidvb_core.c:654:59: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_core.c:654:59: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_core.c:654:59: got restricted __le32 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_core.c:655:56: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_core.c:655:56: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_core.c:655:56: got restricted __le32 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_core.c:656:23: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_core.c:656:23: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_core.c:656:23: got restricted __le32 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_core.c:658:31: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_core.c:658:31: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_core.c:658:31: got restricted __le32 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_core.c:660:33: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_core.c:660:33: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_core.c:660:33: got restricted __le32 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:81:25: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:81:25: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:81:25: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:82:38: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:82:38: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:82:38: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:104:33: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:104:33: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:104:33: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:105:47: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:105:47: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:105:47: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:112:33: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:112:33: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:112:33: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:113:47: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:113:47: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:113:47: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:132:36: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:132:36: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:132:36: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:133:32: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:133:32: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:133:32: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:134:32: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:134:32: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:134:32: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:135:32: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:135:32: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:135:32: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:136:27: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:136:27: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:136:27: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:137:27: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:137:27: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:137:27: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:144:28: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:144:28: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:144:28: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:150:34: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:150:34: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:150:34: got unsigned char *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:157:34: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:157:34: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:157:34: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:158:29: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:158:29: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:158:29: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:165:35: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:165:35: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:165:35: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:170:34: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:170:34: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:170:34: got unsigned char *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:181:34: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:181:34: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:181:34: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:182:29: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:182:29: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:182:29: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:189:29: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:189:29: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:189:29: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:191:37: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:191:37: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:191:37: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:192:35: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:192:35: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:192:35: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:194:21: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:194:21: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:194:21: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:195:9: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:195:9: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:195:9: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:195:9: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:195:9: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:195:9: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:195:9: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:195:9: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:195:9: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:205:47: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:205:47: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:205:47: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:206:29: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:206:29: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:206:29: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:272:53: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:272:53: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:272:53: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:274:53: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:274:53: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:274:53: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_i2c.c:323:22: warning: cast removes address space of expression drivers/media/pci/netup_unidvb/netup_unidvb_ci.c:229:38: warning: cast removes address space of expression drivers/media/pci/netup_unidvb/netup_unidvb_ci.c:229:38: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_ci.c:229:38: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_ci.c:229:38: got unsigned short [usertype] *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:89:25: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:89:25: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:89:25: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:96:46: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:96:46: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:96:46: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:97:25: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:97:25: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:97:25: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:98:49: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:98:49: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:98:49: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:116:44: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:116:44: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:116:44: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:117:23: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:117:23: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:117:23: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:132:48: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:132:48: expected void volatile [noderef] <asn:2>*dst drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:132:48: got unsigned char *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:136:46: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:136:46: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:136:46: got unsigned char *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:144:37: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:144:37: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:144:37: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:145:25: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:145:25: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:145:25: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:154:52: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:154:52: expected void const volatile [noderef] <asn:2>*src drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:154:52: got unsigned char *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:205:23: warning: cast removes address space of expression drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:206:24: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:206:24: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:206:24: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:243:25: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:243:25: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:243:25: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:244:46: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:244:46: expected void volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:244:46: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:245:25: warning: incorrect type in argument 1 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:245:25: expected void const volatile [noderef] <asn:2>*addr drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:245:25: got restricted __le16 *<noident> drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:246:49: warning: incorrect type in argument 2 (different address spaces) drivers/media/pci/netup_unidvb/netup_unidvb_spi.c:246:49: expected void volatile [noderef] <asn:2>*addr Fix the above sparse warnings. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] media: videobuf2: Restructure vb2_bufferJunghak Sung
Remove v4l2 stuff - v4l2_buf, v4l2_plane - from struct vb2_buffer. Add new member variables - bytesused, length, offset, userptr, fd, data_offset - to struct vb2_plane in order to cover all information of v4l2_plane. struct vb2_plane { <snip> unsigned int bytesused; unsigned int length; union { unsigned int offset; unsigned long userptr; int fd; } m; unsigned int data_offset; } Replace v4l2_buf with new member variables - index, type, memory - which are common fields for buffer management. struct vb2_buffer { <snip> unsigned int index; unsigned int type; unsigned int memory; unsigned int num_planes; struct vb2_plane planes[VIDEO_MAX_PLANES]; <snip> }; v4l2 specific fields - flags, field, timestamp, timecode, sequence - are moved to vb2_v4l2_buffer in videobuf2-v4l2.c struct vb2_v4l2_buffer { struct vb2_buffer vb2_buf; __u32 flags; __u32 field; struct timeval timestamp; struct v4l2_timecode timecode; __u32 sequence; }; Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] media: videobuf2: Replace videobuf2-core with videobuf2-v4l2Junghak Sung
Make videobuf2-v4l2 as a wrapper of videobuf2-core for v4l2-use. And replace videobuf2-core.h with videobuf2-v4l2.h. This renaming change should be accompanied by the modifications of all device drivers that include videobuf2-core.h. It can be done with just running this shell script. replace() { str1=$1 str2=$2 dir=$3 for file in $(find $dir -name *.h -o -name *.c -o -name Makefile) do echo $file sed "s/$str1/$str2/g" $file > $file.out mv $file.out $file done } replace "videobuf2-core" "videobuf2-v4l2" "include/media/" replace "videobuf2-core" "videobuf2-v4l2" "drivers/media/" replace "videobuf2-core" "videobuf2-v4l2" "drivers/usb/gadget/" replace "videobuf2-core" "videobuf2-v4l2" "drivers/staging/media/" Signed-off-by: Junghak Sung <jh1009.sung@samsung.com> Signed-off-by: Geunyoung Kim <nenggun.kim@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] cx25821, cx88, tm6000: use SNDRV_DEFAULT_ENABLE_PNPLuis de Bethencourt
Instead of manually initializing the bool array enable, use the SNDRV_DEFAULT_ENABLE_PNP macro. As most drivers do. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] cobalt: fix Kconfig dependencyHans Verkuil
The cobalt driver should depend on VIDEO_V4L2_SUBDEV_API. This fixes this kbuild error: tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 99bc7215bc60f6cd414cf1b85cd9d52cc596cccb commit: 85756a069c55e0315ac5990806899cfb607b987f [media] cobalt: add new driver config: x86_64-randconfig-s0-09201514 (attached as .config) reproduce: git checkout 85756a069c55e0315ac5990806899cfb607b987f # save the attached .config to linux build tree make ARCH=x86_64 All error/warnings (new ones prefixed by >>): drivers/media/i2c/adv7604.c: In function 'adv76xx_get_format': >> drivers/media/i2c/adv7604.c:1853:9: error: implicit declaration of function 'v4l2_subdev_get_try_format' [-Werror=implicit-function-declaration] fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad); ^ drivers/media/i2c/adv7604.c:1853:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion] fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad); ^ drivers/media/i2c/adv7604.c: In function 'adv76xx_set_format': drivers/media/i2c/adv7604.c:1882:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion] fmt = v4l2_subdev_get_try_format(sd, cfg, format->pad); ^ cc1: some warnings being treated as errors Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] use v4l2_get_timestamp where possibleArnd Bergmann
This is a preparation for a change to the type of v4l2 timestamps. v4l2_get_timestamp() is a helper function that reads the monotonic time and stores it into a 'struct timeval'. Multiple drivers implement the same thing themselves for historic reasons. Changing them all to use v4l2_get_timestamp() is more consistent and reduces the amount of code duplication, and most importantly simplifies the following changes. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> [hans.verkuil@cisco.com: dropped the v4l2-dev.c patch that didn't belong here] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] saa7164: video and vbi ports share the same input/tuner/stdHans Verkuil
The vbi port should pass any tuner/input/standard information on to the video port since in the input and tuner are shared between the two. There is no reason to duplicate this code, just pass the ioctls on to the video encoder port. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] saa7164: fix input and tuner compliance problemsHans Verkuil
- the frequency range was never set - there was no initial frequency - missing index/tuner checks - inconsistent standard reporting - removed unnecessary tuner type checks (the core handles that) - clamp frequency to the valid frequency range as per the V4L2 spec Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-10-01[media] saa7164: remove unused videobuf referencesHans Verkuil
This driver includes videobuf headers and selects VIDEOBUF_DVB, but videobuf isn't used at all. Remove this. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>