From 826562e35278faa7c40b3b78a5d51223bee28d00 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 10 Nov 2012 10:39:29 -0500 Subject: usbinput: use autodetection on newer kernels This is a partial "revert" of 822a88700e since kernels as of 3.5 add module aliases for hid devices. Fixes FS#32575. Signed-off-by: Dave Reisner --- install/usbinput | 15 +++++++++++++-- 1 file 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() { -- cgit v1.2.3-24-g4f1b