diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-26 14:28:42 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 14:53:42 -0500 |
commit | 2a29a0d770ef6f24a8fd7806655c826d45888cba (patch) | |
tree | 4eda99c4a9574f9163f6017c6a27bb90c1eee184 /drivers/media/video/em28xx/em28xx.h | |
parent | c864405747fa8b50c1454b280c216f54da834cb4 (diff) |
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.h')
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 3e9ca7899beb..e41015d2e722 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -617,7 +617,7 @@ int em28xx_ir_fini(struct em28xx *dev); | |||
617 | static inline int em28xx_compression_disable(struct em28xx *dev) | 617 | static inline int em28xx_compression_disable(struct em28xx *dev) |
618 | { | 618 | { |
619 | /* side effect of disabling scaler and mixer */ | 619 | /* side effect of disabling scaler and mixer */ |
620 | return em28xx_write_regs(dev, EM28XX_R26_COMPR, "\x00", 1); | 620 | return em28xx_write_reg(dev, EM28XX_R26_COMPR, 0x00); |
621 | } | 621 | } |
622 | 622 | ||
623 | static inline int em28xx_contrast_get(struct em28xx *dev) | 623 | static inline int em28xx_contrast_get(struct em28xx *dev) |