summaryrefslogtreecommitdiffstats
path: root/install/usbinput
diff options
context:
space:
mode:
Diffstat (limited to 'install/usbinput')
-rw-r--r--install/usbinput15
1 files changed, 13 insertions, 2 deletions
diff --git a/install/usbinput b/install/usbinput
index f427600..a292345 100644
--- a/install/usbinput
+++ b/install/usbinput
@@ -1,9 +1,20 @@
#!/bin/bash
build() {
+ local major minor
+
add_checked_modules -f '(_cs|sl811_hcd|isp116x_hcd)' '/usb/host'
- add_all_modules '/hid/hid-'
- add_module 'usbhid?'
+
+ # As of 3.5, modaliases seem to be exported for HID
+ # devices, so we can leverage autodetection.
+ IFS=.- read major minor _ <<<"$KERNELVERSION"
+ if (( major > 3 || (major == 3 && minor >= 5) )); then
+ add_checked_modules '/hid/hid'
+ else
+ add_all_modules '/hid/hid'
+ fi
+
+ add_module 'usbhid'
}
help() {