summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci
Commit message (Collapse)AuthorAgeFilesLines
* sched/headers: Prepare to move signal wakeup & sigpending methods from ↵Ingo Molnar2017-03-026-18/+23
| | | | | | | | | | | | | <linux/sched.h> into <linux/sched/signal.h> Fix up affected files that include this signal functionality via sched.h. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
* sched/headers: Prepare for new header dependencies before moving code to ↵Ingo Molnar2017-03-021-0/+1
| | | | | | | | | | | | | | | | | | <uapi/linux/sched/types.h> We are going to move scheduler ABI details to <uapi/linux/sched/types.h>, which will be used from a number of .c files. Create empty placeholder header that maps to <linux/types.h>. Include the new header in the files that are going to need it. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
* lib/vsprintf.c: remove %Z supportAlexey Dobriyan2017-02-281-1/+1
| | | | | | | | | | | | | | | | | | Now that %z is standartised in C99 there is no reason to support %Z. Unlike %L it doesn't even make format strings smaller. Use BUILD_BUG_ON in a couple ATM drivers. In case anyone didn't notice lib/vsprintf.o is about half of SLUB which is in my opinion is quite an achievement. Hopefully this patch inspires someone else to trim vsprintf.c more. Link: http://lkml.kernel.org/r/20170103230126.GA30170@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [media] ttpci: address stringop overflow warningArnd Bergmann2017-02-082-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | gcc-7.0.1 warns about old code in ttpci: In file included from drivers/media/pci/ttpci/av7110.c:63:0: In function 'irdebi.isra.2', inlined from 'start_debi_dma' at drivers/media/pci/ttpci/av7110.c:376:3, inlined from 'gpioirq' at drivers/media/pci/ttpci/av7110.c:659:3: drivers/media/pci/ttpci/av7110_hw.h:406:3: warning: 'memcpy': specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] memcpy(av7110->debi_virt, (char *) &res, count); In function 'irdebi.isra.2', inlined from 'start_debi_dma' at drivers/media/pci/ttpci/av7110.c:376:3, inlined from 'gpioirq' at drivers/media/pci/ttpci/av7110.c:668:3: drivers/media/pci/ttpci/av7110_hw.h:406:3: warning: 'memcpy': specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=] memcpy(av7110->debi_virt, (char *) &res, count); Apparently, 'count' can be negative here, which will then get turned into a giant size argument for memcpy. Changing the sizes to 'unsigned int' instead seems safe as we already check for maximum sizes, and it also simplifies the code a bit. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] mantis_dvb: fix some error codes in mantis_dvb_init()Dan Carpenter2017-02-031-2/+3
| | | | | | | | | | | We should be returning negative error codes here or it leads to a crash. This also silences a static checker warning. drivers/media/pci/mantis/mantis_cards.c:250 mantis_pci_probe() warn: 'mantis->dmxdev.dvbdev->fops' double freed Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: pci: constify vb2_ops structureBhumika Goyal2017-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare vb2_ops structure as const as it is only stored in the ops field of a vb2_queue structure. This field is of type const, so vb2_ops structures having same properties can be made const too. Done using Coccinelle: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct vb2_ops i@p={...}; @ok1@ identifier r1.i; position p; struct sta2x11_vip vip; struct vb2_queue q; @@ ( vip.vb_vidq.ops=&i@p | q.ops=&i@p ) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct vb2_ops i; File size before: text data bss dec hex filename 8448 440 0 8888 22b8 media/pci/sta2x11/sta2x11_vip.o File size after: text data bss dec hex filename 8552 352 0 8904 22c8 media/pci/sta2x11/sta2x11_vip.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] cx23885: attach md88ds3103 driver via i2c_client for DVBSky S952Niels Ole Salscheider2017-02-031-22/+32
| | | | | | | With this patch we use the new style to attach the frontend. Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ngene: drop ngene_link_reset()Cao jin2017-02-031-7/+0Star
| | | | | | | | In AER recovery, pci_error_handlers.link_reset() is never called, drop it now. Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] saa7164: "first image" should be "second image" in error messageColin Ian King2017-02-031-1/+1
| | | | | | | | | | | The error message when the second image is not available is incorrect, replace "first image" with "second image". Fixes CoverityScan CID#1077508 ("Copy-paste error") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] bt8xx: Delete unnecessary variable initialisations in ca_send_message()Markus Elfring2017-02-031-3/+2Star
| | | | | | | | Two local variables will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] bt8xx: Delete two error messages for a failed memory allocationMarkus Elfring2017-02-031-4/+2Star
| | | | | | | | | Omit extra messages for a memory allocation failure in two functions. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: pci: meye: set error code on failuresPan Bian2017-02-031-0/+1
| | | | | | | | | | | The value of return variable ret is 0 on some error paths, for example, when pci_resource_start() returns a NULL pointer. 0 means no error in this context, which is contrary to the fact. This patch fixes the bug. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189011 Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] tw686x: silent -Wformat-security warningNicolas Iooss2017-02-031-1/+1
| | | | | | | | | | | | | Using sprintf() with a non-literal string makes some compiler complain when building with -Wformat-security (eg. clang reports "format string is not a string literal (potentially insecure)"). Here sprintf() format parameter is indirectly a literal string so there is no security issue. Nevertheless adding a "%s" format string to silent the warning helps to detect real bugs in the kernel. Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ivtv: mark DVB "borrowed" ioctls as deprecatedMauro Carvalho Chehab2017-02-033-18/+46
| | | | | | | | | | | | | | | | | changeset da8ec560e3b4 ("[media] ivtv: implement new decoder command ioctls") implemented proper support for mpeg audio and video control at V4L2 API. Since then, the usage of the the DVB APIs is deprecated. However, we never actually marked it as deprecated nor provided any way to disable it. Let's do it now. This patch prepares for the removal of this bad usage on a couple of Kernel versions. Fixes: da8ec560e3b4 ("[media] ivtv: implement new decoder command ioctls") Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ivtv: use pr_foo() instead of calling printk() directlyMauro Carvalho Chehab2017-01-313-15/+14Star
| | | | | | | | | | | | pr_foo() provides a convenient way for printk's, enforcing that they'll all prepend the error message with the driver's name. Use it inside ivtv. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ivtv: prepare to convert to pr_foo()Mauro Carvalho Chehab2017-01-316-61/+42Star
| | | | | | | | | | | | Move the pr_fmt() macro to ivtv_driver.h and ensure that it will be the first file to be included on all ivtv files. While here, put the includes inside ivtv-driver.h on alphabetic order. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: fix dm1105.c build errorRandy Dunlap2017-01-311-1/+1
| | | | | | | | | | | | | | | Fix dm1105 build error when CONFIG_I2C_ALGOBIT=m and CONFIG_DVB_DM1105=y. drivers/built-in.o: In function `dm1105_probe': dm1105.c:(.text+0x2836e7): undefined reference to `i2c_bit_add_bus' Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reported-by: kbuild test robot <fengguang.wu@intel.com> Cc: Javier Martinez Canillas <javier@osg.samsung.com> Cc: stable@vger.kernel.org # applies to 4.0 (maybe even 3.x) Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ivtv: Clean up file handle in open() error pathSantosh Kumar Singh2017-01-311-0/+1
| | | | | | | | Fix to avoid possible exit file handle in error paths. Signed-off-by: Santosh Kumar Singh <kumar.san1093@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] zoran: Clean up file handle in open() error pathSantosh Kumar Singh2017-01-311-0/+1
| | | | | | | | | Fix to avoid possible memory leak and exit file handle in error paths. Signed-off-by: Santosh Kumar Singh <kumar.san1093@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] solo6x10: use designated initializersKees Cook2017-01-311-1/+1
| | | | | | | | | | | Prepare to mark sensitive kernel structures for randomization by making sure they're using designated initializers. These were identified during allyesconfig builds of x86, arm, and arm64, with most initializer fixes extracted from grsecurity. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] bt8xx: fix memory leakSudip Mukherjee2017-01-311-0/+1
| | | | | | | | | If dvb_attach() fails then we were just printing an error message and exiting but the memory allocated to state was not released. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] b2c2: fix spelling mistake: "Contunuity" -> "Continuity"Colin Ian King2017-01-301-1/+1
| | | | | | | | trivial fix to spelling mistake in deb_chk message Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] cobalt: fix spelling mistake: "Celcius" -> "Celsius"Colin Ian King2017-01-301-2/+2
| | | | | | | | | trivial fix to spelling mistake in cobalt_info message. Anders Celsius was the Swedish astronomer. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] rc-main: assign driver type during allocationAndi Shyti2017-01-308-20/+8Star
| | | | | | | | | | | | | | | | | | | The driver type can be assigned immediately when an RC device requests to the framework to allocate the device. This is an 'enum rc_driver_type' data type and specifies whether the device is a raw receiver or scancode receiver. The type will be given as parameter to the rc_allocate_device device. Change accordingly all the drivers calling rc_allocate_device() so that the device type is specified during the rc device allocation. Whenever the device type is not specified, it will be set as RC_DRIVER_SCANCODE which was the default '0' value. Suggested-by: Sean Young <sean@mess.org> Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] rc: raw IR drivers cannot handle cec, unknown or otherSean Young2017-01-301-7/+7
| | | | | | | | | | | | unknown and other are for IR protocols for which we have no decoder, so the raw IR drivers have no chance of generating them. cec is not an IR protocol. Signed-off-by: Sean Young <sean@mess.org> Cc: Jiri Kosina <jikos@kernel.org> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] media: Drop FSF's postal address from the source code filesSakari Ailus2017-01-27150-677/+38Star
| | | | | | | | | | | | | | | | | | | | | Drop the FSF's postal address from the source code files that typically contain mostly the license text. Of the 628 removed instances, 578 are outdated. The patch has been created with the following command without manual edits: git grep -l "675 Mass Ave\|59 Temple Place\|51 Franklin St" -- \ drivers/media/ include/media|while read i; do i=$i perl -e ' open(F,"< $ENV{i}"); $a=join("", <F>); $a =~ s/[ \t]*\*\n.*You should.*\n.*along with.*\n.*(\n.*USA.*$)?\n//m && $a =~ s/(^.*)Or, (point your browser to) /$1To obtain the license, $2\n$1/m; close(F); open(F, "> $ENV{i}"); print F $a; close(F);'; done Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
* Merge tag 'v4.10-rc1' into patchworkMauro Carvalho Chehab2016-12-266-9/+7Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux 4.10-rc1 * tag 'v4.10-rc1': (11427 commits) Linux 4.10-rc1 powerpc: Fix build warning on 32-bit PPC avoid spurious "may be used uninitialized" warning mm: add PageWaiters indicating tasks are waiting for a page bit mm: Use owner_priv bit for PageSwapCache, valid when PageSwapBacked ktime: Get rid of ktime_equal() ktime: Cleanup ktime_set() usage ktime: Get rid of the union clocksource: Use a plain u64 instead of cycle_t irqchip/armada-xp: Consolidate hotplug state space irqchip/gic: Consolidate hotplug state space coresight/etm3/4x: Consolidate hotplug state space cpu/hotplug: Cleanup state names cpu/hotplug: Remove obsolete cpu hotplug register/unregister functions staging/lustre/libcfs: Convert to hotplug state machine scsi/bnx2i: Convert to hotplug state machine scsi/bnx2fc: Convert to hotplug state machine cpu/hotplug: Prevent overwriting of callbacks x86/msr: Remove bogus cleanup from the error path bus: arm-ccn: Prevent hotplug callback leak ...
| * ktime: Cleanup ktime_set() usageThomas Gleixner2016-12-252-5/+3Star
| | | | | | | | | | | | | | | | | | | | ktime_set(S,N) was required for the timespec storage type and is still useful for situations where a Seconds and Nanoseconds part of a time value needs to be converted. For anything where the Seconds argument is 0, this is pointless and can be replaced with a simple assignment. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org>
| * Replace <asm/uaccess.h> with <linux/uaccess.h> globallyLinus Torvalds2016-12-244-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This was entirely automated, using the script by Al: PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>' sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \ $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h) to do the replacement at the end of the merge window. Requested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | [media] media/cobalt: use pci_irq_allocate_vectorsChristoph Hellwig2016-12-212-8/+2Star
|/ | | | | | | | | | | Simply the interrupt setup by using the new PCI layer helpers. Despite using pci_enable_msi_range, this driver was only requesting a single MSI vector anyway. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] cx88: make checkpatch.pl happyMauro Carvalho Chehab2016-11-2516-872/+975
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usually, I don't like fixing coding style issues on non-staging drivers, as it could be a mess pretty easy, and could become like a snow ball. That's the case of recent changes on two changesets: they disalign some statements. Yet, a care a lot with cx88 driver, as it was the first driver I touched at the Kernel, and I've been maintaining it since 2005. So, several of the coding style issues were due to my code. Per Andrey's suggestion, I ran checkpatch.pl in strict mode, with fixed several other issues, did some function alinments, but broke other alinments. So, I had to manually apply another round of manual fixes to make sure that everything is ok, and to make checkpatch happy with this patch. With this patch, checkpatch.pl is now happy when called with: ./scripts/checkpatch.pl -f --max-line-length=998 --ignore PREFER_PR_LEVEL Also, the 80-cols violations that made sense were fixed. Checkpatch would be happier if we convert it to use dev_foo(), but this is a more complex change. NOTE: there are some places with msleep(1). As this driver was written at the time that the default was to sleep at least 10ms on such calls (e. g. CONFIG_HZ=100), I replaced those calls by usleep_range(10000, 20000), with should be safe to avoid breakages. Fixes: 65bc2fe86e66 ("[media] cx88: convert it to use pr_foo() macros") Fixes: 7b61ba8ff838 ("[media] cx88: make checkpatch happier") Suggested-by: Andrey Utkin <andrey_utkin@fastmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Reviewed-by: Andrey Utkin <andrey_utkin@fastmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] netup_unidvb: use module_pci_driverGeliang Tang2016-11-221-12/+1Star
| | | | | | | Use module_pci_driver() helper to simplify the code. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] zoran: fix spelling mistake in dprintk messageColin Ian King2016-11-221-1/+1
| | | | | | | | | Trivial fix to spelling mistake "unnsupported" to "unsupported" in debug message. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] dvb: make DVB frontend *_ops instances "const"Max Kellermann2016-11-183-10/+10
| | | | | | | | | | | | | These are immutable. Making them "const" allows the compiler to move them to the "rodata" section. Note that cxd2841er_t_c_ops cannot be made "const", because cxd2841er_attach() modifies it. Ouch! [mchehab@s-opensource.com: fix merge conflicts] Signed-off-by: Max Kellermann <max.kellermann@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] saa7134: fix warm Medion 7134 EEPROM readMaciej S. Szmigiero2016-11-181-0/+31
| | | | | | | | | | | | | | When saa7134 module driving a Medion 7134 card is reloaded reads of this card EEPROM (required for automatic detection of tuner model) will be corrupted due to I2C gate in DVB-T demod being left closed. This sometimes also happens on first saa7134 module load after a warm reboot. Fix this by opening this I2C gate before doing EEPROM read during i2c initialization. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ttpci: cleanup debug macros and remove dead codeMauro Carvalho Chehab2016-11-183-19/+11Star
| | | | | | | | | | | | | Continuation lines without KERN_CONT won't work anymore. However, the way dprintk() was defined leads to the usage of continuation lines, with should be avoided when possible. So, redefine those macros. While hre, remove some dead code at av7110.c with also relies on continuation lines. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] zoran: use KERN_CONT where neededMauro Carvalho Chehab2016-11-181-21/+14Star
| | | | | | | | | | Some continuation messages are not using KERN_CONT. Since commit 563873318d32 ("Merge branch 'printk-cleanups"), this won't work as expected anymore. So, let's add KERN_CONT to those lines. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] pluto2: use KERN_CONT where neededMauro Carvalho Chehab2016-11-181-2/+2
| | | | | | | | | | Some continuation messages are not using KERN_CONT. Since commit 563873318d32 ("Merge branch 'printk-cleanups"), this won't work as expected anymore. So, let's add KERN_CONT to those lines. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] cx88: make checkpatch happierMauro Carvalho Chehab2016-11-1815-559/+515Star
| | | | | | | | | | | | | | | | This driver is old, and have lots of checkpatch violations. As we're touching a lot on this driver due to the printk conversions, let's run checkpatch --fix on it, in order to solve some of those issues. Also, do a few manual adjustments: - remove the FSF address and use the usual coding style for the initial comments; - use WARN_ON() instead of BUG_ON(); - remove an unused typedef; - break a few long lines. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] cx88: convert it to use pr_foo() macrosMauro Carvalho Chehab2016-11-1814-343/+311Star
| | | | | | | | | | | Instead of calling printk() directly, use pr_foo() macros, as suggested at the Kernel's coding style. Please notice that a conversion to dev_foo() is not trivial, as several parts on this driver uses pr_cont(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] cx88: use KERN_CONT where neededMauro Carvalho Chehab2016-11-182-25/+20Star
| | | | | | | | | | | | Some continuation messages are not using KERN_CONT. Since commit 563873318d32 ("Merge branch 'printk-cleanups'"), this won't work as expected anymore. So, let's add KERN_CONT to those lines. While here, add missing log level annotations. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] cx23885: convert it to use pr_foo() macrosMauro Carvalho Chehab2016-11-1818-219/+209Star
| | | | | | | | | | | Instead of calling printk() directly, use pr_foo() macros, as suggested at the Kernel's coding style. Please notice that a conversion to dev_foo() is not trivial, as several parts on this driver uses pr_cont(). Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] cx23885: use KERN_CONT where neededMauro Carvalho Chehab2016-11-182-8/+8
| | | | | | | | | | | | Some continuation messages are not using KERN_CONT. Since commit 563873318d32 ("Merge branch 'printk-cleanups'"), this won't work as expected anymore. So, let's add KERN_CONT to those lines. While here, add missing log level annotations. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] bt8xx: use pr_foo() macros instead of printk()Mauro Carvalho Chehab2016-11-182-31/+40
| | | | | | | Replace printk() macros by their pr_foo() counterparts, using pr_cont() for continuation lines. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] bt8xx/dst: use a more standard way to print messagesMauro Carvalho Chehab2016-11-181-144/+118Star
| | | | | | | | | | | | | | | | | This driver uses a weird, non-standard macro to print errors. It allows hiding all messages, including error ones, with doesn't seem a good idea. Instead, replace it to pr_foo(), and, for error messages, use pr_err(). The remaining messages were previouly classified as notice, info or debug, but they all looked like debug messages. So, add a dprintk() macro using the "verbose" modprobe argument to select what will be displayed. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* Merge tag 'v4.9-rc5' into patchworkMauro Carvalho Chehab2016-11-162-4/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux 4.9-rc5 * tag 'v4.9-rc5': (1102 commits) Linux 4.9-rc5 gp8psk: Fix DVB frontend attach gp8psk: fix gp8psk_usb_in_op() logic dvb-usb: move data_mutex to struct dvb_usb_device iio: maxim_thermocouple: detect invalid storage size in read() aoe: fix crash in page count manipulation lightnvm: invalid offset calculation for lba_shift Kbuild: enable -Wmaybe-uninitialized warnings by default pcmcia: fix return value of soc_pcmcia_regulator_set infiniband: shut up a maybe-uninitialized warning crypto: aesni: shut up -Wmaybe-uninitialized warning rc: print correct variable for z8f0811 dib0700: fix nec repeat handling s390: pci: don't print uninitialized data for debugging nios2: fix timer initcall return value x86: apm: avoid uninitialized data NFSv4.1: work around -Wmaybe-uninitialized warning Kbuild: enable -Wmaybe-uninitialized warning for "make W=1" lib/stackdepot: export save/fetch stack for drivers mm: kmemleak: scan .data.ro_after_init ...
| * mm: replace get_user_pages_unlocked() write/force parameters with gup_flagsLorenzo Stoakes2016-10-182-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | This removes the 'write' and 'force' use from get_user_pages_unlocked() and replaces them with 'gup_flags' to make the use of FOLL_FORCE explicit in callers as use of this flag can result in surprising behaviour (and hence bugs) within the mm subsystem. Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Acked-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | [media] cobalt: fix copy-and-paste errorHans Verkuil2016-11-161-1/+1
| | | | | | | | | | | | | | | | The vmr_stat variable was filled with the contents of the control register, not the status register. Classic copy-and-paste error. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] cobalt: add cropcap supportHans Verkuil2016-11-161-0/+21
| | | | | | | | | | | | | | | | Now that the timings contain picture aspect ratio information, we can support cropcap to return the pixel aspect ratio. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* | [media] squash lines for simple wrapper functionsMasahiro Yamada2016-11-162-7/+2Star
| | | | | | | | | | | | | | | | Remove unneeded variables and assignments. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>