diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2004-11-13 05:21:12 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 22:26:25 -0700 |
commit | 2092fbcdebf5313f29b43bdaa57a22baf0c0269f (patch) | |
tree | 81a534c099ab35af05f0faaad17ab76635be9717 /namedev.c | |
parent | 6818c51d7abeab9914eb7193968b1efa9459a853 (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.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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); |