core: allow grabbing QMI ports

This commit is contained in:
Aleksander Morgado
2012-04-11 11:38:49 +02:00
parent ab67c0b7c3
commit 306b4eb509
7 changed files with 106 additions and 25 deletions

View File

@@ -140,6 +140,17 @@ get_device_ids (GUdevDevice *device,
/* Platform devices don't usually have a VID/PID */
success = TRUE;
goto out;
} else if (!strcmp (parent_subsys, "usb") &&
!strcmp (g_udev_device_get_driver (parent), "qmi_wwan")) {
/* Need to look for vendor/product in the parent of the QMI device */
GUdevDevice *qmi_parent;
qmi_parent = g_udev_device_get_parent (parent);
if (qmi_parent) {
vid = g_udev_device_get_property (qmi_parent, "ID_VENDOR_ID");
pid = g_udev_device_get_property (qmi_parent, "ID_MODEL_ID");
g_object_unref (qmi_parent);
}
}
}
}