diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-30 13:57:56 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-30 13:57:56 +0200 |
commit | 1ca46bb4a7e750655f3d066881f4f3823c03f537 (patch) | |
tree | b91bcec76111903dc4276e669502a07ebda57ef8 /plugins | |
parent | a4e5964506cbb6613421ab44bb43c225eb9d82a3 (diff) |
port-probe: easier check for Icera support over a list of port probes
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/sierra/mm-plugin-sierra.c | 10 | ||||
-rw-r--r-- | plugins/zte/mm-plugin-zte.c | 10 |
2 files changed, 2 insertions, 18 deletions
diff --git a/plugins/sierra/mm-plugin-sierra.c b/plugins/sierra/mm-plugin-sierra.c index dc8fce54..a480a3e7 100644 --- a/plugins/sierra/mm-plugin-sierra.c +++ b/plugins/sierra/mm-plugin-sierra.c @@ -163,15 +163,7 @@ create_modem (MMPlugin *self, GList *probes, GError **error) { - GList *l; - gboolean is_icera; - - for (l = probes, is_icera = FALSE; l && !is_icera; l = g_list_next (l)) { - if (mm_port_probe_is_icera (MM_PORT_PROBE (l->data))) - is_icera = TRUE; - } - - if (is_icera) + if (mm_port_probe_list_is_icera (probes)) return MM_BASE_MODEM (mm_broadband_modem_sierra_icera_new (sysfs_path, drivers, mm_plugin_get_name (self), diff --git a/plugins/zte/mm-plugin-zte.c b/plugins/zte/mm-plugin-zte.c index cf48f236..739393c6 100644 --- a/plugins/zte/mm-plugin-zte.c +++ b/plugins/zte/mm-plugin-zte.c @@ -59,15 +59,7 @@ create_modem (MMPlugin *self, GList *probes, GError **error) { - GList *l; - gboolean is_icera; - - for (l = probes, is_icera = FALSE; l && !is_icera; l = g_list_next (l)) { - if (mm_port_probe_is_icera (MM_PORT_PROBE (l->data))) - is_icera = TRUE; - } - - if (is_icera) + if (mm_port_probe_list_is_icera (probes)) return MM_BASE_MODEM (mm_broadband_modem_zte_icera_new (sysfs_path, drivers, mm_plugin_get_name (self), |