diff options
author | Kay Sievers <kay@vrfy.org> | 2013-08-07 13:10:01 +0200 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2013-09-10 06:03:59 -0400 |
commit | 91b9dcfde39cb544782dba99ad10282b49df1a08 (patch) | |
tree | 9e1492a840e3265a8c6d0260f6ca404fe6059d7f | |
parent | libudev: enumerate - do not try to match against an empty subsystem (diff) | |
download | eudev-91b9dcfde39cb544782dba99ad10282b49df1a08.tar.gz eudev-91b9dcfde39cb544782dba99ad10282b49df1a08.tar.bz2 eudev-91b9dcfde39cb544782dba99ad10282b49df1a08.zip |
udev: hwdb - try reading modalias for usb before falling back to the composed one
-rw-r--r-- | src/udev/udev-builtin-hwdb.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/udev/udev-builtin-hwdb.c b/src/udev/udev-builtin-hwdb.c index f1c0ca9cb..d6aa96bb3 100644 --- a/src/udev/udev-builtin-hwdb.c +++ b/src/udev/udev-builtin-hwdb.c @@ -102,14 +102,13 @@ static int udev_builtin_hwdb_search(struct udev_device *dev, struct udev_device if (subsystem && !streq(dsubsys, subsystem)) continue; + modalias = udev_device_get_property_value(d, "MODALIAS"); + /* the usb_device does not have a modalias, compose one */ - if (streq(dsubsys, "usb")) + if (!modalias && streq(dsubsys, "usb")) modalias = modalias_usb(d, s, sizeof(s)); if (!modalias) - modalias = udev_device_get_property_value(d, "MODALIAS"); - - if (!modalias) continue; n = udev_builtin_hwdb_lookup(dev, prefix, modalias, filter, test); |