summaryrefslogtreecommitdiff
path: root/v4l/scripts/em28xx.pl
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-10-26 01:10:44 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-26 01:10:44 -0200
commitdf090b62971d4b3892a226903c1949ac61b04c77 (patch)
treee4b62df9c370bd42e5bec22a7192c20a7697eb52 /v4l/scripts/em28xx.pl
parent70b44e408f0ea27f4e4d5bc627466d25d6221b69 (diff)
downloadmediapointer-dvb-s2-df090b62971d4b3892a226903c1949ac61b04c77.tar.gz
mediapointer-dvb-s2-df090b62971d4b3892a226903c1949ac61b04c77.tar.bz2
Make em28xx.pl script more generic to identify other em28xx chips
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'v4l/scripts/em28xx.pl')
-rwxr-xr-xv4l/scripts/em28xx.pl13
1 files changed, 4 insertions, 9 deletions
diff --git a/v4l/scripts/em28xx.pl b/v4l/scripts/em28xx.pl
index 278dfc214..9a97def2a 100755
--- a/v4l/scripts/em28xx.pl
+++ b/v4l/scripts/em28xx.pl
@@ -8,11 +8,7 @@ my %data;
while (<>) {
# defines in header file
- if (/#define\s+(EM2820_BOARD_\w+)\s+(\d+)/) {
- $data{$1}->{nr} = $2;
- next;
- }
- if (/#define\s+(EM2800_BOARD_\w+)\s+(\d+)/) {
+ if (/#define\s+(EM28[\d]._BOARD_\w+)\s+(\d+)/) {
$data{$1}->{nr} = $2;
next;
}
@@ -22,11 +18,10 @@ while (<>) {
$data{$id}->{id} = $id;
$data{$id}->{type} = "(em2820/em2840)";
# $data{$id}->{nr} = $nr++;
- };
- if (/\[(EM2800_BOARD_\w+)\]/) {
- $id = $1;
+ } elsif (/\[(EM)(28[\d].)(_BOARD_\w+)\]/) {
+ $id = "$1$2$3";
$data{$id}->{id} = $id;
- $data{$id}->{type} = "(em2800)";
+ $data{$id}->{type} = "(em$2)";
# $data{$id}->{nr} = $nr++;
};