core: handle the 'usb'->'usbmisc' subsystem rename in the kernel

We'll try to cope with getting devices being reported in either 'usb' or
'usbmisc', trying to avoid the need of checking kernel version during runtime.
This commit is contained in:
Aleksander Morgado
2012-08-21 11:32:24 +02:00
parent 8cb021293c
commit 494a70a8ff
6 changed files with 32 additions and 15 deletions

View File

@@ -188,6 +188,10 @@ apply_pre_probing_filters (MMPlugin *self,
for (i = 0; self->priv->subsystems[i]; i++) {
if (g_str_equal (subsys, self->priv->subsystems[i]))
break;
/* New kernels may report as 'usbmisc' the subsystem */
else if (g_str_equal (self->priv->subsystems[i], "usb") &&
g_str_equal (subsys, "usbmisc"))
break;
}
/* If we didn't match any subsystem: unsupported */