summaryrefslogtreecommitdiffstats
path: root/perl-install/mouse.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/mouse.pm')
-rw-r--r--perl-install/mouse.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 3d2551009..d31041a32 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -111,7 +111,6 @@ sub detect() {
eval { commands::modprobe("serial") };
my $r; $r = mouseconfig(); return $r if $r;
- modules::unload("serial");
#- my %l;
#- eval { commands::modprobe("serial") };
#- @l{qw(FULLNAME nbuttons MOUSETYPE XMOUSETYPE device)} = split("\n", `mouseconfig --nointeractive 2>/dev/null`) and return \%l;
@@ -120,7 +119,7 @@ sub detect() {
if (my ($c) = pci_probing::main::probe("SERIAL_USB")) {
eval { modules::load($c->[1], 'usbmouse') };
sleep(1);
- return name2mouse("USB Mouse") if !$@ && detect_devices::tryOpen("usbmouse");
+ do { modules::unload("serial"); return name2mouse("USB Mouse") } if !$@ && detect_devices::tryOpen("usbmouse");
modules::unload($c->[1]);
}
die "mouseconfig failed";