summaryrefslogtreecommitdiffstats
path: root/plugins/udevng.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-05-26 07:35:58 +0200
committerMarcel Holtmann <marcel@holtmann.org>2012-05-26 07:35:58 +0200
commitd5dc9c967dc51adb82d2a83b7cdfdc1b1eab8013 (patch)
tree93612a4b3a4478ad615ab17afd5d26e5f94d63ed /plugins/udevng.c
parentfba1efe1a5f9da85e4bbec6264f8cdd5f0fb1b5e (diff)
downloadofono-d5dc9c967dc51adb82d2a83b7cdfdc1b1eab8013.tar.bz2
udev: Fix matching to prefer entries with VID and PID
Diffstat (limited to 'plugins/udevng.c')
-rw-r--r--plugins/udevng.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/udevng.c b/plugins/udevng.c
index 6890cc6e..872039a3 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -911,6 +911,7 @@ static void add_device(const char *syspath, const char *devname,
else
sysattr = NULL;
+ DBG("%s", syspath);
DBG("%s", devpath);
DBG("%s (%s) %s [%s] ==> %s %s", devnode, driver,
interface, number, label, sysattr);
@@ -1033,7 +1034,7 @@ static void check_usb_device(struct udev_device *device)
driver = vendor_list[i].driver;
vendor = vid;
model = pid;
- break;
+ continue;
}
if (vid == NULL || pid == NULL)
@@ -1041,11 +1042,9 @@ static void check_usb_device(struct udev_device *device)
if (g_str_equal(vendor_list[i].vid, vid) == TRUE) {
if (vendor_list[i].pid == NULL) {
- if (driver == NULL) {
- driver = vendor_list[i].driver;
- vendor = vid;
- model = pid;
- }
+ driver = vendor_list[i].driver;
+ vendor = vid;
+ model = pid;
continue;
}