diff options
Diffstat (limited to 'kernel/xpp/utils/zconf/Zaptel/Hardware/PCI.pm')
-rw-r--r-- | kernel/xpp/utils/zconf/Zaptel/Hardware/PCI.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/xpp/utils/zconf/Zaptel/Hardware/PCI.pm b/kernel/xpp/utils/zconf/Zaptel/Hardware/PCI.pm index e9166c7..73e3e71 100644 --- a/kernel/xpp/utils/zconf/Zaptel/Hardware/PCI.pm +++ b/kernel/xpp/utils/zconf/Zaptel/Hardware/PCI.pm @@ -134,12 +134,13 @@ sub pci_sorter { return $a->priv_device_name() cmp $b->priv_device_name(); } -sub new($$) { - my $pack = shift or die "Wasn't called as a class method\n"; - my $self = { @_ }; +sub new($@) { + my $pack = shift || die "Wasn't called as a class method\n"; + my %attr = @_; + my $name = sprintf("pci:%s", $attr{PRIV_DEVICE_NAME}); + my $self = Zaptel::Hardware->new($name, 'PCI'); + %{$self} = (%{$self}, %attr); bless $self, $pack; - Zaptel::Hardware::device_detected($self, - sprintf("pci:%s", $self->{PRIV_DEVICE_NAME})); return $self; } @@ -197,7 +198,6 @@ sub scan_devices($) { next unless defined $pci_ids{$key}; my $d = Zaptel::Hardware::PCI->new( - BUS_TYPE => 'PCI', PRIV_DEVICE_NAME => $dev->{PRIV_DEVICE_NAME}, VENDOR => $dev->{VENDOR}, PRODUCT => $dev->{PRODUCT}, |