summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-03-20 12:28:12 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2015-03-20 12:28:12 +0100
commit9a2e1571c0d535ee784cd0401f1086d790c7650b (patch)
tree39332ea4ee897587ee40c7780f9425d17dfeccd2 /rules
parent568d800b784223eb37a5cd75e66dc03510fae638 (diff)
rules: avoid 'device/' accesses
We should never access parents, as the sysfs hierarchy is in no way stable. Use KERNELS== etc. to match on a parent, then access it via $attr{} (which accesses the matching device, not the current device).
Diffstat (limited to 'rules')
-rw-r--r--rules/60-keyboard.rules2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules/60-keyboard.rules b/rules/60-keyboard.rules
index af3edb5f58..fe616917da 100644
--- a/rules/60-keyboard.rules
+++ b/rules/60-keyboard.rules
@@ -13,7 +13,7 @@ DRIVERS=="atkbd", IMPORT{builtin}="hwdb 'keyboard:atkbd:$attr{[dmi/id]modalias}'
RUN{builtin}+="keyboard", GOTO="keyboard_end"
# device matching the input device name and the machine's DMI data
-IMPORT{builtin}="hwdb 'keyboard:name:$attr{device/name}:$attr{[dmi/id]modalias}'", \
+KERNELS=="input*", IMPORT{builtin}="hwdb 'keyboard:name:$attr{name}:$attr{[dmi/id]modalias}'", \
RUN{builtin}+="keyboard", GOTO="keyboard_end"
LABEL="keyboard_end"