From 9634d83a5ef91e195c135a1c58d7269c8636c694 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 8 Jul 2002 10:16:01 +0000 Subject: - s/snd-card/snd/ - make some code clearer --- perl-install/modules.pm | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'perl-install/modules.pm') diff --git a/perl-install/modules.pm b/perl-install/modules.pm index de06013db..6a87c4081 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -143,13 +143,10 @@ sub set_options { sub add_alias { my ($alias, $module) = @_; $module =~ /ignore/ and return; - /\Q$alias/ && $conf{$_}{alias} && $conf{$_}{alias} eq $module and return $_ foreach keys %conf; + /\Q$alias/ && $conf{$_}{alias} && $conf{$_}{alias} eq $module and return $_ foreach keys %conf; log::l("adding alias $alias to $module"); $conf{$alias}{alias} ||= $module; - - if ($module =~ /^snd-card-/) { - $conf{$module}{above} = 'snd-pcm-oss'; - } + $conf{$module}{above} = 'snd-pcm-oss' if $module =~ /^snd-/; $alias; } sub add_probeall { @@ -333,15 +330,9 @@ sub when_load { add_probeall('scsi_hostadapter', $name); eval { load('sd_mod') }; } - if ($category =~ /sound/) { - add_alias('sound-slot-0', $name); - } - if ($name =~ /^snd-card-/) { - load('snd-pcm-oss'); - } - if ($name =~ /usb-[uo]hci/ || $name eq 'ehci-hcd') { - add_probeall('usb-interface', $name); - } + add_alias('sound-slot-0', $name) if $category =~ /sound/; + load('snd-pcm-oss') if $name =~ /^snd-/; + add_probeall('usb-interface', $name) if $name =~ /usb-[uo]hci/ || $name eq 'ehci-hcd'; $conf{$name}{options} = join " ", @options if @options; } -- cgit v1.2.1