Commit graph

9 commits

Author SHA1 Message Date
Mauro Carvalho Chehab 446aba663b [media] tveeprom: get rid of unused arg on tveeprom_hauppauge_analog()
tveeprom_hauppauge_analog() used to need the I2C adapter in
order to print debug messages. As it now uses pr_foo() facilities
since commit 6037b3ca28 ("[media] tveeprom: print log messages
using pr_foo()"), the first argument of the function is not
needed anymore.

So, get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-03 07:35:02 -03:00
Sakari Ailus bcb63314e2 [media] media: Drop FSF's postal address from the source code files
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>
2017-01-27 11:38:09 -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 7cda4c5bae [media] tveeprom: use dev_foo() for printk messages
Instead of calling a V4L-specific macro, do the right thing
and use the dev_foo() macros.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-10-21 10:09:05 -02:00
Mauro Carvalho Chehab 2a3edc5d55 [media] common: 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 10:05:06 -02:00
Matthias Schwarzott c4e7b893a5 [media] tveeprom: Update list of chips and extend serial number to 32bits
The update was supplied directly by PCTV.

Add tuner ids 182-188.
Add audproc ids 45-52.
Add decoder chip ids 43-53.
Use 32bits for the serial number.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-11-03 16:18:49 -02:00
Hans Verkuil 3300101001 [media] tveeprom: remove v4l2-chip-ident.h include
Replace the V4L2_IDENT_* usage with tveeprom-specific defines. This header
is deprecated, so those defines shouldn't be used anymore.
The em28xx driver is the only one that uses the tveeprom audio_processor
field, so that has been updated to use the new tveeprom AUDPROC define.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-06-17 08:48:03 -03:00
Mauro Carvalho Chehab cc318180c8 [media] tveeprom: Fix lots of bad whitespace
While running checkpatch.pl after the last patch, I noticed
lots of those:
	WARNING: please, no space before tabs
	#151: FILE: drivers/media/common/tveeprom.c:99:
	+^I{ TUNER_ABSENT,        ^I^I"None" },$

(together with other checkpatch.pl errors/warnings)

While I won't be fixing everything, as I have already an
script to fix the above, let's do it, in order to clean it
a little bit.

While here, also drop cmacs-specific format text at the end.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-08 16:19:22 -02:00
Hans Verkuil a393edad2a [media] tveeprom: move from media/i2c to media/common
The tveeprom module is a helper module for Hauppauge-based eeproms.
It's used by many drivers and the i2c part is actually optional, so this
driver is better placed in the media/common directory.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-02-08 16:12:29 -02:00
Renamed from drivers/media/i2c/tveeprom.c (Browse further)