X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=namedev.c;h=c5c7929ab212680cb53a76710dbf7b6ecd53c91b;hb=2092fbcdebf5313f29b43bdaa57a22baf0c0269f;hp=8bf3c0e73e87ac1d702d56df0425d8cbd1339950;hpb=6818c51d7abeab9914eb7193968b1efa9459a853;p=elogind.git diff --git a/namedev.c b/namedev.c index 8bf3c0e73..c5c7929ab 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);