diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-26 16:28:42 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 17:53:42 -0200 |
commit | 2a29a0d770ef6f24a8fd7806655c826d45888cba (patch) | |
tree | 4eda99c4a9574f9163f6017c6a27bb90c1eee184 /drivers/media/video/em28xx/em28xx-audio.c | |
parent | c864405747fa8b50c1454b280c216f54da834cb4 (diff) | |
download | kernel_samsung_smdk4412-2a29a0d770ef6f24a8fd7806655c826d45888cba.zip kernel_samsung_smdk4412-2a29a0d770ef6f24a8fd7806655c826d45888cba.tar.gz kernel_samsung_smdk4412-2a29a0d770ef6f24a8fd7806655c826d45888cba.tar.bz2 |
V4L/DVB (9758): em28xx: replace some magic by register descriptions where known
Replaces all occurrences of em28xx_write_regs_req() and em28xx_write_reg()
used to setup register names by em28xx_write_reg().
Also, documents the register names that are known.
This patch were generated by this small perl script:
my %reg_map = (
# Register table - the same as defined on parse_em28xx.pl script
);
while (<>) {
if (m/(.*)em28xx_write_regs_req\(dev\,\s*0x00\,\s*(.*)\,\s*\"\\x(..)\",\s*1\)\;(.*)/) {
my $reg = $2;
my $val = $3;
$val =~ tr/A-f/a-f/;
$reg = $reg_map{$reg} if defined($reg_map{$reg});
printf "$1em28xx_write_reg(dev, %s, 0x%s);$4\n", $reg, $val;
} elsif (m/(.*)em28xx_write_regs\(dev\,\s*(.*)\,\s*\"\\x(..)\",\s*1\)\;(.*)/) {
my $reg = $2;
my $val = $3;
$val =~ tr/A-f/a-f/;
$reg = $reg_map{$reg} if defined($reg_map{$reg});
printf "$1em28xx_write_reg(dev, %s, 0x%s);$4\n", $reg, $val;
} else {
print $_;
}
}
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-audio.c')
0 files changed, 0 insertions, 0 deletions