diff options
author | Dan Williams <dcbw@redhat.com> | 2009-10-05 09:52:01 -0700 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2009-10-05 09:52:01 -0700 |
commit | 912b98723b2965b9aaf1f0328781a2730d7cc178 (patch) | |
tree | bb14053467b6551ac6b49b2cdf18f0183bd1a55e /src | |
parent | 3b19a85727458821f5df20153f8c04bc7717ba30 (diff) | |
parent | aa78b5f5e5319e04f5b57f928bfab69dd4b93d88 (diff) |
Merge commit 'origin/master' into enable-split
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-manager.c | 2 | ||||
-rw-r--r-- | src/mm-plugin-base.c | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/mm-manager.c b/src/mm-manager.c index a812c792..73189146 100644 --- a/src/mm-manager.c +++ b/src/mm-manager.c @@ -612,7 +612,7 @@ handle_uevent (GUdevClient *client, /* We only care about tty/net devices when adding modem ports, * but for remove, also handle usb parent device remove events */ - if (!strcmp (action, "add") && strcmp (subsys, "usb") !=0 ) + if ((!strcmp (action, "add") || !strcmp (action, "move")) && strcmp (subsys, "usb") !=0 ) device_added (self, device); else if (!strcmp (action, "remove")) device_removed (self, device); diff --git a/src/mm-plugin-base.c b/src/mm-plugin-base.c index 7adbe2a2..7455046f 100644 --- a/src/mm-plugin-base.c +++ b/src/mm-plugin-base.c @@ -664,7 +664,7 @@ static char * get_driver_name (GUdevDevice *device) { GUdevDevice *parent = NULL; - const char *driver; + const char *driver, *subsys; char *ret = NULL; driver = g_udev_device_get_driver (device); @@ -672,6 +672,15 @@ get_driver_name (GUdevDevice *device) parent = g_udev_device_get_parent (device); if (parent) driver = g_udev_device_get_driver (parent); + + /* Check for bluetooth; it's driver is a bunch of levels up so we + * just check for the subsystem of the parent being bluetooth. + */ + if (!driver && parent) { + subsys = g_udev_device_get_subsystem (parent); + if (subsys && !strcmp (subsys, "bluetooth")) + driver = "bluetooth"; + } } if (driver) @@ -694,7 +703,7 @@ real_find_physical_device (MMPluginBase *plugin, GUdevDevice *child) g_return_val_if_fail (child != NULL, NULL); iter = g_object_ref (child); - while (iter && i++ < 5) { + while (iter && i++ < 8) { subsys = g_udev_device_get_subsystem (iter); if (subsys) { if (is_usb || !strcmp (subsys, "usb")) { |