From ae92c8c4d4bcba8d2cf0e75973545c56d0db1d0d Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 24 Mar 2001 18:16:10 +0000 Subject: (cleanup_subids): cleanup --- convert/merge2pcitable.pl | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'convert/merge2pcitable.pl') diff --git a/convert/merge2pcitable.pl b/convert/merge2pcitable.pl index b5fd394b..354720cc 100755 --- a/convert/merge2pcitable.pl +++ b/convert/merge2pcitable.pl @@ -1,5 +1,10 @@ #!/usr/bin/perl +@ignored_modules = ( +qw(alsa ignore), +qw(tr bcm5700), # redhat have this, ignore it +); + if ($0 =~ /merge2pcitable/) { $ARGV[0] eq '-f' and $force = shift; @@ -19,15 +24,20 @@ if ($0 =~ /merge2pcitable/) write_pcitable($d_pci); } else { 1 } +sub member { my $e = shift; foreach (@_) { $e eq $_ and return 1 } 0 } + +sub dummy_module { + my ($m) = @_; + $m =~ s/"(.*)"/$1/; + member($m, @ignored_modules); +} + sub to_string { my ($id, $driver) = @_; my ($module, $text) = map { qq("$_") } @$driver; my ($id1, $id2, $subid1, $subid2) = map { "0x$_" } ($id =~ /(....)/g); join "\t", $id1, $id2, "$subid1 $subid2" ne "0xffff 0xffff" ? ($subid1, $subid2) : (), $module, $text; } -sub dummy_module { - $_[0] =~ /alsa|ignore/; -} # works for RedHat's pcitable old and new format, + mdk format (alike RedHat's old one) # (the new format has ending .o's and double quotes are removed) @@ -175,7 +185,7 @@ sub merge { sub cleanup_subids { my ($drivers) = @_; - my %l, %m; + my (%l, %m); foreach (sort keys %$drivers) { my ($id, $subid) = /(........)(........)/; if ($l{$id}) { -- cgit v1.2.1