From df090b62971d4b3892a226903c1949ac61b04c77 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 26 Oct 2007 01:10:44 -0200 Subject: Make em28xx.pl script more generic to identify other em28xx chips From: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- v4l/scripts/em28xx.pl | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'v4l/scripts/em28xx.pl') 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++; }; -- cgit v1.2.3