rules: load drivers only on "add" events

Previously we were loading kernel modules on all device events save
for "remove". With the introduction of KOBJ_BIND/KOBJ_UNBIND this causes
issues, as driver modules that have devices bound to their drivers get
immediately reloaded, and it appears to the user that module unloading
does not work.

Let's change the rules to only load modules on "add" events instead.
This commit is contained in:
Dmitry Torokhov 2017-09-11 11:47:38 -07:00 committed by Harald Hoyer
parent c13ee7cc8b
commit 9b32afa9f2
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
# do not edit this file, it will be overwritten on update
ACTION=="remove", GOTO="drivers_end"
ACTION!="add", GOTO="drivers_end"
ENV{MODALIAS}=="?*", RUN{builtin}+="kmod load $env{MODALIAS}"
SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}+="kmod load tifm_sd"