From: "Gustavo F. Padovan" <[email protected]>

Some drivers name are not properly set, so we need to rely on the VID
information as well
---
 plugins/udevng.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/plugins/udevng.c b/plugins/udevng.c
index 1365bd1..5fd9475 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -857,14 +857,16 @@ static void check_usb_device(struct udev_device *device)
                DBG("%s [%s:%s]", drv, vid, pid);
 
                for (i = 0; vendor_list[i].driver; i++) {
-                       if (g_str_equal(vendor_list[i].drv, drv) == FALSE)
-                               continue;
-
-                       if (vendor_list[i].vid == NULL) {
-                               driver = vendor_list[i].driver;
-                               break;
+                       if (g_str_equal(vendor_list[i].drv, drv) == TRUE) {
+                               if (vendor_list[i].vid == NULL) {
+                                       driver = vendor_list[i].driver;
+                                       break;
+                               }
                        }
 
+                       if (vendor_list[i].vid == NULL)
+                               continue;
+
                        if (g_str_equal(vendor_list[i].vid, vid) == TRUE) {
                                if (vendor_list[i].pid == NULL) {
                                        if (driver == NULL)
-- 
1.7.6.2

_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to