summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/linux/integration-test.py8
-rw-r--r--src/linux/up-enumerator-udev.c17
2 files changed, 23 insertions, 2 deletions
diff --git a/src/linux/integration-test.py b/src/linux/integration-test.py
index 1e48fa2..db5058c 100755
--- a/src/linux/integration-test.py
+++ b/src/linux/integration-test.py
@@ -2291,6 +2291,14 @@ class Tests(dbusmock.DBusTestCase):
'remove')
self.testbed.uevent('/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.2/0003:056A:0084.0021/input/input129',
'remove')
+ self.testbed.uevent('/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0',
+ 'remove')
+ self.testbed.uevent('/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.1',
+ 'remove')
+ self.testbed.uevent('/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.2',
+ 'remove')
+ self.testbed.uevent('/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1',
+ 'remove')
self.daemon_log.check_line('No devices with parent /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1 left', timeout=2)
# Ensure the object is really gone from the bus,
diff --git a/src/linux/up-enumerator-udev.c b/src/linux/up-enumerator-udev.c
index 1182bdf..3077d11 100644
--- a/src/linux/up-enumerator-udev.c
+++ b/src/linux/up-enumerator-udev.c
@@ -120,6 +120,19 @@ device_new (UpEnumeratorUdev *self, GUdevDevice *native)
"native", native,
NULL);
+ } else if (g_strcmp0 (subsys, "usb") == 0) {
+#ifdef HAVE_IDEVICE
+ UpDevice *device;
+
+ device = g_initable_new (UP_TYPE_DEVICE_IDEVICE, NULL, NULL,
+ "daemon", daemon,
+ "native", native,
+ NULL);
+ if (device)
+ return device;
+#endif /* HAVE_IDEVICE */
+
+ return NULL;
} else if (g_strcmp0 (subsys, "usbmisc") == 0) {
#ifdef HAVE_IDEVICE
UpDevice *device;
@@ -289,8 +302,8 @@ up_enumerator_udev_initable_init (UpEnumerator *enumerator)
guint i;
const gchar **subsystems;
/* List "input" first just to avoid some sibling hotplugging later */
- const gchar *subsystems_no_wup[] = {"input", "power_supply", "usbmisc", NULL};
- const gchar *subsystems_wup[] = {"input", "power_supply", "usbmisc", "tty", NULL};
+ const gchar *subsystems_no_wup[] = {"input", "power_supply", "usb", "usbmisc", NULL};
+ const gchar *subsystems_wup[] = {"input", "power_supply", "usb", "usbmisc", "tty", NULL};
config = up_config_new ();
if (up_config_get_boolean (config, "EnableWattsUpPro"))