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.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/mouse.pm b/perl-install/mouse.pm
index 20509559c..a16c0b1d7 100644
--- a/perl-install/mouse.pm
+++ b/perl-install/mouse.pm
@@ -136,19 +136,19 @@ sub detect() {
my ($r, $wacom) = mouseconfig(); return ($r, $wacom) if $r;
require pci_probing::main;
- if (my ($c) = pci_probing::main::probe("SERIAL_USB")) {
+ if (my ($c) = grep { $_->[1] =~ /usb-/ } pci_probing::main::probe('')) {
eval {
modules::load($c->[1], "SERIAL_USB");
modules::load("usbmouse");
modules::load("mousedev");
};
sleep(1);
- do {
+ if (!$@ && detect_devices::tryOpen("usbmouse")) {
$wacom or modules::unload("serial");
modules::load("usbkbd");
modules::load("keybdev");
return name2mouse("USB Mouse"), $wacom;
- } if !$@ && detect_devices::tryOpen("usbmouse");
+ }
modules::unload("mousedev");
modules::unload("usbmouse");
modules::unload($c->[1], 'remove_alias');