summaryrefslogtreecommitdiff
path: root/namedev.c
diff options
context:
space:
mode:
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>2004-11-13 05:21:12 +0100
committerGreg KH <gregkh@suse.de>2005-04-26 22:26:25 -0700
commit2092fbcdebf5313f29b43bdaa57a22baf0c0269f (patch)
tree81a534c099ab35af05f0faaad17ab76635be9717 /namedev.c
parent6818c51d7abeab9914eb7193968b1efa9459a853 (diff)
[PATCH] support DRIVER as a rule key
Match with a rule against a device with a specific kernel driver.
Diffstat (limited to 'namedev.c')
-rw-r--r--namedev.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/namedev.c b/namedev.c
index 8bf3c0e73e..c5c7929ab2 100644
--- a/namedev.c
+++ b/namedev.c
@@ -626,6 +626,17 @@ static int match_rule(struct config_device *dev, struct sysfs_class_device *clas
}
}
+ /* check for matching driver */
+ if (dev->driver[0] != '\0') {
+ dbg("check for " FIELD_DRIVER " dev->driver='%s' sysfs_device->driver_name='%s'", dev->driver, sysfs_device->driver_name);
+ if (strcmp_pattern(dev->driver, sysfs_device->driver_name) != 0) {
+ dbg(FIELD_DRIVER " is not matching");
+ goto try_parent;
+ } else {
+ dbg(FIELD_DRIVER " matches");
+ }
+ }
+
/* check for matching bus id */
if (dev->id[0] != '\0') {
dbg("check " FIELD_ID);