summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconvert/merge2pcitable.pl18
1 files changed, 14 insertions, 4 deletions
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}) {