[PATCH] rules: avoid reading DRIVER for devices without modalias

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



DRIVER requires a readlink() in sysfs.  The MODALIAS key is provided by
uevent and requires no additional read.  Test MODALIAS first.

Signed-off-by: Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx>

diff --git a/rules/rules.d/80-drivers.rules b/rules/rules.d/80-drivers.rules
index 7e13e80..2b68ddc 100644
--- a/rules/rules.d/80-drivers.rules
+++ b/rules/rules.d/80-drivers.rules
@@ -2,7 +2,7 @@

ACTION!="add", GOTO="drivers_end"

-DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe -b $env{MODALIAS}"
+ENV{MODALIAS}=="?*", DRIVER!="?*", RUN{ignore_error}+="/sbin/modprobe -b $env{MODALIAS}"
SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/sbin/modprobe -b tifm_sd"
SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/sbin/modprobe -b tifm_ms"
SUBSYSTEM=="memstick", RUN+="/sbin/modprobe -b --all ms_block mspro_block"

--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux