Commit graph

10 commits

Author SHA1 Message Date
Mauro Carvalho Chehab 4a58d39075 [media] b2c2: don't break long lines
Due to the 80-cols restrictions, and latter due to checkpatch
warnings, several strings were broken into multiple lines. This
is not considered a good practice anymore, as it makes harder
to grep for strings at the source code.

As we're right now fixing other drivers due to KERN_CONT, we need
to be able to identify what printk strings don't end with a "\n".
It is a way easier to detect those if we don't break long lines.

So, join those continuation lines.

The patch was generated via the script below, and manually
adjusted if needed.

</script>
use Text::Tabs;
while (<>) {
	if ($next ne "") {
		$c=$_;
		if ($c =~ /^\s+\"(.*)/) {
			$c2=$1;
			$next =~ s/\"\n$//;
			$n = expand($next);
			$funpos = index($n, '(');
			$pos = index($c2, '",');
			if ($funpos && $pos > 0) {
				$s1 = substr $c2, 0, $pos + 2;
				$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
				$s2 =~ s/^\s+//;

				$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");

				print unexpand("$next$s1\n");
				print unexpand("$s2\n") if ($s2 ne "");
			} else {
				print "$next$c2\n";
			}
			$next="";
			next;
		} else {
			print $next;
		}
		$next="";
	} else {
		if (m/\"$/) {
			if (!m/\\n\"$/) {
				$next=$_;
				next;
			}
		}
	}
	print $_;
}
</script>

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 09:38:31 -02:00
Mauro Carvalho Chehab b430eaba0b [media] flexcop-usb: don't use stack for DMA
The USB control messages require DMA to work. We cannot pass
a stack-allocated buffer, as it is not warranted that the
stack would be into a DMA enabled area.

While here, remove a dead function calling usb_control_msg().

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-14 12:52:29 -03:00
Patrick Boettcher 99e44da792 [media] media: change email address
Soon my dibcom.fr/parrot.com-address won't respond anymore.
Thus I'm replacing it. And, while being at it,
let's adapt some other (old) email-addresses as well.

Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25 12:01:08 -02:00
Chen Gang 6c7e346974 [media] drivers: media: usb: b2c2: use usb_*_coherent() instead of pci_*_consistent() in flexcop-usb.c
Some architectures do not support PCI, but still support USB, so need
let our usb driver try to use usb_* instead of pci_* to support these
architectures, or can not pass compiling.
The related error (with allmodconfig for arc):
    CC [M]  drivers/media/usb/b2c2/flexcop-usb.o
  drivers/media/usb/b2c2/flexcop-usb.c: In function ‘flexcop_usb_transfer_exit’:
  drivers/media/usb/b2c2/flexcop-usb.c:393: error: implicit declaration of function ‘pci_free_consistent’
  drivers/media/usb/b2c2/flexcop-usb.c: In function ‘flexcop_usb_transfer_init’:
  drivers/media/usb/b2c2/flexcop-usb.c:410: error: implicit declaration of function ‘pci_alloc_consistent’

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-17 11:26:41 -03:00
Mauro Carvalho Chehab 01b0c11a1b [media] Kconfig: Fix b2c2 common code selection
As reported by Randy:

> flexcop-pci.c:(.text+0x19af63): undefined reference to `flexcop_device_exit'
> flexcop-pci.c:(.text+0x19af77): undefined reference to `flexcop_device_kfree'
> flexcop-pci.c:(.text+0x19b10f): undefined reference to `flexcop_pass_dmx_packets'
> flexcop-pci.c:(.text+0x19b182): undefined reference to `flexcop_pass_dmx_data'
> flexcop-pci.c:(.text+0x19b1ae): undefined reference to `flexcop_pass_dmx_data'
> flexcop-pci.c:(.text+0x19b1f8): undefined reference to `flexcop_device_kmalloc'
> flexcop-pci.c:(.text+0x19b256): undefined reference to `flexcop_i2c_request'
> flexcop-pci.c:(.text+0x19b261): undefined reference to `flexcop_eeprom_check_mac_addr'
> flexcop-pci.c:(.text+0x19b2c6): undefined reference to `flexcop_device_initialize'
> flexcop-pci.c:(.text+0x19b332): undefined reference to `flexcop_sram_set_dest'
> flexcop-pci.c:(.text+0x19b348): undefined reference to `flexcop_sram_set_dest'
> flexcop-pci.c:(.text+0x19b3f8): undefined reference to `flexcop_device_exit'
> flexcop-pci.c:(.text+0x19b408): undefined reference to `flexcop_device_kfree'
> flexcop-pci.c:(.text+0x19b4a2): undefined reference to `flexcop_pid_feed_control'
> flexcop-pci.c:(.text+0x19b4d7): undefined reference to `flexcop_pid_feed_control'
>
> since it is possible to enable DVB_B2C2_FLEXCOP_PCI
> when CONFIG_I2C is not enabled, but then DVB_B2C2_FLEXCOP
> is not enabled because I2C is not enabled.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21 08:38:31 -03:00
Mauro Carvalho Chehab 8511f8eaa8 [media] flexcop: Show the item to enable debug after the driver
Instead of showing the option to show debug at the end, show
it after each driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-21 08:05:33 -03:00
Mauro Carvalho Chehab 88f8472c9f [media] Fix some Makefile rules
On a few places, := were using instead of +=, causing drivers to
not compile.

While here, standardize the usage of += on all cases where multiple
lines are needed, and for obj-y/obj-m targets, and := when just one
line is needed, on <module>-obj rules.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Identified-by: Antti Polosaari <crope@iki.fi>
Tested-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-16 19:55:03 -03:00
Mauro Carvalho Chehab b3f52608ba [media] b2c2: frontends/tuners are not needed at the bridge binding
The frontends/tuners are used inside the common part of the driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 23:52:53 -03:00
Mauro Carvalho Chehab ccae7af2bf [media] common: move media/common/tuners to media/tuners
Move the tuners one level up, as the "common" directory will be used
by drivers that are shared between more than one driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 23:40:28 -03:00
Mauro Carvalho Chehab 3785bc170f [media] b2c2: break it into common/pci/usb directories
b2c2 is, in fact, 2 drivers: one for PCI and one for USB, plus
a common bus-independent code. Break it accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 23:38:31 -03:00