diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-26 17:28:42 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-26 17:28:42 -0200 |
commit | a6965c34bf836e6d9c5d3888bd7e01105ef32306 (patch) | |
tree | d7d3e31adcd4770390826373a71a43e9b7a158e6 /linux/drivers/media/video/ivtv/ivtv-mailbox.c | |
parent | 0be93bb183e34c9271b6cc20c1da18fa8beaa07c (diff) | |
download | mediapointer-dvb-s2-a6965c34bf836e6d9c5d3888bd7e01105ef32306.tar.gz mediapointer-dvb-s2-a6965c34bf836e6d9c5d3888bd7e01105ef32306.tar.bz2 |
em28xx: replace some magic by register descriptions where known
From: Mauro Carvalho Chehab <mchehab@redhat.com>
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 $_;
}
}
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-mailbox.c')
0 files changed, 0 insertions, 0 deletions