1
0
Fork 0
Commit Graph

634947 Commits (5a91206ff0d0548939f3e85a65fb76b400fb0e89)

Author SHA1 Message Date
Maciej S. Szmigiero 5a91206ff0 [media] saa7134: fix warm Medion 7134 EEPROM read
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>
2016-11-18 14:04:53 -02:00
CrazyCat 5fa88151ec [media] dvb-usb-cxusb: Geniatech T230 - resync TS FIFO after lock
This patch fix streaming issue for Geniatech T230/PT360.

Signed-off-by: CrazyCat <crazycat69@narod.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 13:46:28 -02:00
Peter Griffin bfc303e7be [media] c8sectpfe: Remove clk_disable_unprepare hacks
Now that CLK_PROC_STFE is defined as a critical clock in
DT, we can remove the commented clk_disable_unprepare from
the c8sectpfe driver. This means we now have balanced
clk*enable/disable calls in the driver, but on STiH407
family the clock in reality will never actually be disabled.

This is due to a HW bug where once the IP has been configured
and the SLIM core is running, disabling the clock causes a
unrecoverable bus lockup.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 13:40:33 -02:00
Jean-Baptiste Abbadie 8be135d052 [media] Staging: media: radio-bcm2048: Remove FSF address from GPL notice
Removes the superfluous statement about writing to the FSF in the GPL
notice

Signed-off-by: Jean-Baptiste Abbadie <jb@abbadie.fr>
Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 13:40:01 -02:00
Jean-Baptiste Abbadie 3194e858c5 [media] Staging: media: radio-bcm2048: Fix indentation
Align multiple lines statement with parentheses

Signed-off-by: Jean-Baptiste Abbadie <jb@abbadie.fr>
Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 13:39:42 -02:00
Jean-Baptiste Abbadie 24dc974d1c [media] Staging: media: radio-bcm2048: Fix symbolic permissions
This replaces the S_* style permissions by numbers for the __ATTR macros

Signed-off-by: Jean-Baptiste Abbadie <jb@abbadie.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 13:39:14 -02:00
Sakari Ailus bb16d21cfa [media] doc-rst: v4l: Add documentation on CSI-2 bus configuration
Document the interface between the CSI-2 transmitter and receiver drivers.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 13:27:03 -02:00
Markus Elfring ce3aeaf22c [media] winbond-cir: Use kmalloc_array() in wbcir_tx()
A multiplication for the size determination of a memory allocation
indicated that an array data structure should be processed.
Thus use the corresponding function "kmalloc_array".

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 11:04:29 -02:00
Markus Elfring 3f81678d8e [media] RedRat3: Return directly after a failed rc_allocate_device() in redrat3_init_rc_dev()
Return directly after a call of the function "rc_allocate_device" failed
at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:55:59 -02:00
Markus Elfring 9d45d5fbeb [media] RedRat3: Delete an unnecessary variable initialisation in redrat3_init_rc_dev()
The local variable "ret" 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>
2016-11-18 10:52:57 -02:00
Markus Elfring 7aa20afea6 [media] RedRat3: Delete an unnecessary variable initialisation in redrat3_get_firmware_rev()
The local variable "rc" 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>
2016-11-18 10:50:46 -02:00
Markus Elfring fac59136bc [media] RedRat3: Return directly after a failed kcalloc() in redrat3_transmit_ir()
* Return directly after a call of the function "kcalloc" failed
  at the beginning.

* Reorder two calls for the function "kfree" at the end.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:50:19 -02:00
Markus Elfring 576df632f2 [media] RedRat3: Improve another size determination in redrat3_reset()
Replace the specification of a data type by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:48:22 -02:00
Markus Elfring 559f64d4de [media] RedRat3: Delete six messages for a failed memory allocation
The script "checkpatch.pl" pointed information out like the following.

WARNING: Possible unnecessary 'out of memory' message

Thus remove such a logging statement in five functions.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:40:27 -02:00
Markus Elfring 0bebaa5f01 [media] RedRat3: Use kcalloc() in two functions
* Multiplications for the size determination of memory allocations
  indicated that array data structures should be processed.
  Thus use the corresponding function "kcalloc".

  This issue was detected by using the Coccinelle software.

* Replace the specification of data types by pointer dereferences
  to make the corresponding size determination a bit safer according to
  the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:34:39 -02:00
Mauro Carvalho Chehab 6037b3ca28 [media] tveeprom: print log messages using pr_foo()
Unfortunately, the callers of tveeprom don't do the right
thing to initialize the device. So, it produces log messages
like:

[  267.533010]  (null): Hauppauge model 42012, rev C186, serial# 2819348
[  267.533012]  (null): tuner model is Philips FQ1236 MK3 (idx 86, type 43)
[  267.533013]  (null): TV standards NTSC(M) (eeprom 0x08)
[  267.533014]  (null): audio processor is MSP3445 (idx 12)
[  267.533015]  (null): has radio

So, replace it to pr_foo(), as it should work fine.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:13:11 -02:00
Mauro Carvalho Chehab d3d96820d0 [media] rc-main: use pr_foo() macros
Instead of calling printk() directly, use pr_foo() macro.

That should make the rc_core messages be formatted with the
right prefix.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:11:37 -02:00
Mauro Carvalho Chehab e513411489 [media] tvp5150: get rid of KERN_CONT
Unfortunately, KERN_CONT doesn't work with dev_foo(),
producing weird messages like:

	tvp5150 6-005c: tvp5150: read 0xf6 = 0xff
	ff

So, we need to get rid of it.

As we're always printing read/write in hexa when dumping
multiple register values, also remove the "0x" from the
read/write debug messages too.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:11:09 -02:00
Mauro Carvalho Chehab ad0e374470 [media] tvp5150: Get rid of direct calls to printk()
When returning results via v4l2_subdev_core_ops.log_status,
use dev_foo() call, instead of just calling printk()
directly, without even specifying the log message level.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:10:43 -02:00
Mauro Carvalho Chehab 257e29f84e [media] tvp5150: convert it to use dev_foo() macros
Instead of using v4l_foo(), use the dev_foo() macros, as
most modern media drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:10:07 -02:00
Mauro Carvalho Chehab ce8591ff02 [media] em28xx: convert it from pr_foo() to dev_foo()
Instead of using pr_foo(), use dev_foo(), with provides a
better output. As this device is a multi-interface one,
we'll set the device name to show the chipset and the driver
used.

While here, get rid of printk continuation messages.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:08:15 -02:00
Mauro Carvalho Chehab 39ad799a85 [media] msp3400: convert it to use dev_foo() macros
Instead of using the v4l_foo() macros, just use the
kernel-wide dev_foo() macros, as there's no good reason
to use something else.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:07:18 -02:00
Mauro Carvalho Chehab b68d75b955 [media] msp3400-driver: don't use KERN_CONT
Drivers using dev_foo() macro should not use KERN_CONT, as, internally,
those macros work as if all strings were terminated by a \n. So, doing:

	dev_info(&client->dev, "%s ", client->name);
	printk(KERN_CONT "supports radio, mode is autodetect and autoselect");

Would produce the following output:

	msp3400 6-0044: msp3400
	supports radio, mode is autodetect and autoselect

As there's no good reason to use KERN_CONT, let's rewrite the code
to avoid that, allowing this driver to be converted to dev_foo().

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:06:49 -02:00
Mauro Carvalho Chehab a41231d52f [media] v4l2-common: add a debug macro to be used with dev_foo()
Currently, there's a mess at the V4L2 printk macros: some drivers
use their own macros, others use pr_foo() or v4l_foo() macros,
while more modern drivers use dev_foo() macros.

The best is to get rid of v4l_foo() macros, as they can be
replaced by either dev_foo() or pr_foo(). Yet, such change can
be disruptive, as dev_foo() cannot use KERN_CONT. So, the best
is to do such change driver by driver.

There are replacements for most v4l_foo() macros, but it lacks
a way to enable debug messages per level. So, add such macro,
in order to make the conversion easier.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:04:58 -02:00
Mauro Carvalho Chehab 680d87c0a9 [media] tuner-core: use pr_foo, instead of internal printk macros
Tuner core uses its own printk internal macros, instead of the
standard debug ones, for no good reason.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:04:28 -02:00
Mauro Carvalho Chehab cc8e7ff440 [media] af9005: remove a printk that would require a KERN_CONT
The dvb-usb system has its own macro to print hexa dumps
(debug_dump). Such macro doesn't support messages with
KERN_CONT after commit 563873318d ("Merge branch 'printk-cleanups'").
So, let's get rid of a printk() that would be assuming that
this would work.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:02:47 -02:00
Mauro Carvalho Chehab 0a6dc89ae4 [media] dibx000_common: use pr_foo() instead of printk()
The dprintk() macro relies on continuation lines. This is not
a good practice and will break after commit 563873318d
("Merge branch 'printk-cleanups'").

So, instead of directly calling printk(), use pr_foo() macros,
adding a \n leading char on each macro call.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:01:56 -02:00
Mauro Carvalho Chehab 3dd722622f [media] dib9000: use pr_foo() instead of printk()
The dprintk() macro relies on continuation lines. This is not
a good practice and will break after commit 563873318d
("Merge branch 'printk-cleanups'").

So, instead of directly calling printk(), use pr_foo() macros,
adding a\n leading char on each macro call.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 10:01:02 -02:00
Mauro Carvalho Chehab 8af16adfbb [media] dib8000: use pr_foo() instead of printk()
The dprintk() macro relies on continuation lines. This is not
a good practice and will break after commit 563873318d
("Merge branch 'printk-cleanups'").

So, instead of directly calling printk(), use pr_foo() macros,
adding a\n leading char on each macro call.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 09:59:38 -02:00
Mauro Carvalho Chehab 5a0e2a4e93 [media] dib7000p: use pr_foo() instead of printk()
The dprintk() macro relies on continuation lines. This is not
a good practice and will break after commit 563873318d
("Merge branch 'printk-cleanups'").

So, instead of directly calling printk(), use pr_foo() macros,
adding a \n leading char on each macro call.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 09:57:10 -02:00
Mauro Carvalho Chehab 7570227724 [media] dib7000m: use pr_foo() instead of printk()
The dprintk() macro relies on continuation lines. This is not
a good practice and will break after commit 563873318d
("Merge branch 'printk-cleanups'").

So, instead of directly calling printk(), use pr_foo() macros,
adding a \n leading char on each macro call.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 09:55:50 -02:00
Mauro Carvalho Chehab 441d54e343 [media] dib3000mc: use pr_foo() instead of printk()
The dprintk() macro relies on continuation lines. This is not
a good practice and will break after commit 563873318d
("Merge branch 'printk-cleanups'").

So, instead of directly calling printk(), use pr_foo() macros,
adding a \n leading char on each macro call.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 09:48:42 -02:00
Mauro Carvalho Chehab 585e3227ec [media] dib3000mb: use pr_foo() instead of printk()
The dprintk() macro relies on continuation lines. This is not
a good practice and will break after commit 563873318d
("Merge branch 'printk-cleanups'").

So, instead of directly calling printk(), use pr_foo() macros,
adding a \n leading char on each macro call.

The frontend settings also rely on continuation lines. Change
it to avoid the need of adding pr_cont() calls.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 09:47:48 -02:00
Mauro Carvalho Chehab 4bd1a8ddad [media] dib0090: use pr_foo() instead of printk()
The dprintk() macro relies on continuation lines. This is not
a good practice and will break after commit 563873318d
("Merge branch 'printk-cleanups").

So, instead of directly calling printk(), use pr_foo() macros,
adding a \n leading char on each macro call.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 09:44:48 -02:00
Mauro Carvalho Chehab fb11cbd1a9 [media] dib0070: use pr_foo() instead of printk()
The dprintk() macro relies on continuation lines. This is not
a good practice and will break after commit 563873318d
("Merge branch 'printk-cleanups").

So, instead of directly calling printk(), use pr_foo() macros,
adding a \n leading char on each macro call.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 09:43:55 -02:00
Mauro Carvalho Chehab a80e1d965c [media] ttpci: cleanup debug macros and remove dead code
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>
2016-11-18 09:40:43 -02:00
Mauro Carvalho Chehab 61fc87498b [media] ttusb_dec: use KERNEL_CONT where needed
Some continuation messages are not using KERNEL_CONT.

Since commit 563873318d ("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>
2016-11-18 09:38:37 -02:00
Mauro Carvalho Chehab 6dc3a35563 [media] pvrusb2: use KERNEL_CONT where needed
Some continuation messages are not using KERNEL_CONT.

Since commit 563873318d ("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>
2016-11-18 09:37:49 -02:00
Mauro Carvalho Chehab ac2ac8376e [media] wl128x: use KERNEL_CONT where needed
Some continuation messages are not using KERNEL_CONT.

Since commit 563873318d ("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>
2016-11-18 09:37:24 -02:00
Mauro Carvalho Chehab 623b2f4a67 [media] zoran: use KERN_CONT where needed
Some continuation messages are not using KERN_CONT.

Since commit 563873318d ("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>
2016-11-18 09:36:30 -02:00
Mauro Carvalho Chehab 7c66e12136 [media] pluto2: use KERN_CONT where needed
Some continuation messages are not using KERN_CONT.

Since commit 563873318d ("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>
2016-11-18 09:35:46 -02:00
Mauro Carvalho Chehab 7b61ba8ff8 [media] cx88: make checkpatch happier
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>
2016-11-18 08:44:51 -02:00
Mauro Carvalho Chehab 65bc2fe86e [media] cx88: convert it to use pr_foo() macros
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>
2016-11-18 08:14:27 -02:00
Mauro Carvalho Chehab 3b0cb24f96 [media] cx88: use KERN_CONT where needed
Some continuation messages are not using KERN_CONT.

Since commit 563873318d ("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>
2016-11-18 08:10:15 -02:00
Mauro Carvalho Chehab e39682b5d9 [media] cx23885: convert it to use pr_foo() macros
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>
2016-11-18 08:09:36 -02:00
Mauro Carvalho Chehab f1dc10b6e1 gp8psk-fe: add missing MODULE_foo() macros
This file was converted to a separate module at commit 7a0786c19d
("gp8psk: Fix DVB frontend attach"), because the DVB attach routines
require it to work.  However, I forgot to copy the MODULE_foo() macros
from the original module, causing this warning:

    WARNING: modpost: missing MODULE_LICENSE() in drivers/media/dvb-frontends/gp8psk-fe.o

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 7a0786c19d ("gp8psk: Fix DVB frontend attach")
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-11-18 08:06:38 -02:00
Mauro Carvalho Chehab 09f8be263c [media] cx23885: use KERN_CONT where needed
Some continuation messages are not using KERN_CONT.

Since commit 563873318d ("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>
2016-11-18 08:05:40 -02:00
Mauro Carvalho Chehab fa132a64e2 [media] bt8xx: use pr_foo() macros instead of printk()
Replace printk() macros by their pr_foo() counterparts, using
pr_cont() for continuation lines.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 08:02:20 -02:00
Mauro Carvalho Chehab 7c64691353 [media] bt8xx/dst: use a more standard way to print messages
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>
2016-11-18 08:01:29 -02:00
Mauro Carvalho Chehab fed9d8f3cd [media] stv090x: get rid of continuation lines
This driver has printk continuation lines for debugging purposes.
Since commit 563873318d ("Merge branch 'printk-cleanups'")',
this won't work as expected anymore.

So, use %*ph and get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-11-18 07:56:23 -02:00