mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-07 04:00:32 +01:00
core: recognize platform 'gadget' devices too
This commit is contained in:
parent
74d798b6dd
commit
cecc0621ce
1 changed files with 6 additions and 2 deletions
|
|
@ -439,9 +439,13 @@ device_creator (NMUdevManager *manager,
|
|||
if (parent) {
|
||||
driver = g_udev_device_get_driver (parent);
|
||||
if (!driver) {
|
||||
/* try the grandparent only if it's an ibmebus device */
|
||||
/* try the grandparent if it's an ibmebus device or if the
|
||||
* subsys is NULL which usually indicates some sort of
|
||||
* platform device like a 'gadget' net interface.
|
||||
*/
|
||||
subsys = g_udev_device_get_subsystem (parent);
|
||||
if (subsys && !strcmp (subsys, "ibmebus")) {
|
||||
if ( (g_strcmp0 (subsys, "ibmebus") == 0)
|
||||
|| (subsys == NULL)) {
|
||||
grandparent = g_udev_device_get_parent (parent);
|
||||
if (grandparent)
|
||||
driver = g_udev_device_get_driver (grandparent);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue