plugins: allow plugins to more easily suggest port types
ZTE modems need to use udev rules to assign port type hints, so generalize that and port all the plugins over to suggested port types in the MMModem interface's grab_port() function.
This commit is contained in:
@@ -147,7 +147,7 @@ grab_port (MMPluginBase *base,
|
||||
}
|
||||
|
||||
if (modem) {
|
||||
if (!mm_modem_grab_port (modem, subsys, name, NULL, error)) {
|
||||
if (!mm_modem_grab_port (modem, subsys, name, MM_PORT_TYPE_UNKNOWN, NULL, error)) {
|
||||
g_object_unref (modem);
|
||||
return NULL;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ grab_port (MMPluginBase *base,
|
||||
} else {
|
||||
if (caps & (MM_PLUGIN_BASE_PORT_CAP_GSM | CAP_CDMA)) {
|
||||
modem = existing;
|
||||
if (!mm_modem_grab_port (modem, subsys, name, NULL, error))
|
||||
if (!mm_modem_grab_port (modem, subsys, name, MM_PORT_TYPE_UNKNOWN, NULL, error))
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user