summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconvert/merge2pcitable.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/convert/merge2pcitable.pl b/convert/merge2pcitable.pl
index 354720cc..071b58da 100755
--- a/convert/merge2pcitable.pl
+++ b/convert/merge2pcitable.pl
@@ -89,6 +89,20 @@ sub read_kernel_pcimap {
\%drivers;
}
+sub read_kernel_usbmap {
+ my ($f) = @_;
+ my %drivers;
+ open F, $f or die "read_kernel_usbmap: can't open $f\n";
+ foreach (<F>) {
+ chomp;
+ next if /^#/ || /^\s*$/;
+ my ($module, $flag, $id1, $id2) = split;
+ hex($flag) == 3 or next;
+ $drivers{join '', map { /(....)$/ } $id1, $id2, "ffff", "ffff"} = [ $module, '' ];
+ }
+ \%drivers;
+}
+
sub read_pciids {
my ($f) = @_;
my %drivers;