summaryrefslogtreecommitdiff
path: root/src/udev/udev-builtin-hwdb.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-08-07 13:10:01 +0200
committerKay Sievers <kay@vrfy.org>2013-08-07 16:47:31 +0200
commit0238cf7cda0720c21d9b40d7256988aba29fc565 (patch)
tree746786b48d2311c4b125bd18799c1c17051d7299 /src/udev/udev-builtin-hwdb.c
parent0787758d26337ec897d9553fe962678fbf0a0962 (diff)
udev: hwdb - try reading modalias for usb before falling back to the composed one
Diffstat (limited to 'src/udev/udev-builtin-hwdb.c')
-rw-r--r--src/udev/udev-builtin-hwdb.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/udev/udev-builtin-hwdb.c b/src/udev/udev-builtin-hwdb.c
index f1c0ca9cb1..d6aa96bb3d 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);