diff options
author | Dan Williams <dcbw@redhat.com> | 2010-03-30 14:50:40 -0700 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-03-30 14:50:40 -0700 |
commit | 720e38aec0a50aa2136f01b7f3620a4e261c0406 (patch) | |
tree | 06dbd68d467b4652f6de97c9fe1b70b02b830a71 /plugins/mm-plugin-novatel.c | |
parent | 39326f249105b7d71c63125f29e3bee2143a82d2 (diff) |
core: move physical device checking into the manager
It turns out that the manager needs to know about the physical
device so we can prevent multiple plugins from claiming ports on
the same modem.
Diffstat (limited to 'plugins/mm-plugin-novatel.c')
-rw-r--r-- | plugins/mm-plugin-novatel.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/plugins/mm-plugin-novatel.c b/plugins/mm-plugin-novatel.c index 3b594818..a968836a 100644 --- a/plugins/mm-plugin-novatel.c +++ b/plugins/mm-plugin-novatel.c @@ -111,7 +111,7 @@ grab_port (MMPluginBase *base, MMPluginBaseSupportsTask *task, GError **error) { - GUdevDevice *port = NULL, *physdev = NULL; + GUdevDevice *port = NULL; MMModem *modem = NULL; const char *name, *subsys, *devfile, *sysfs_path; guint32 caps; @@ -125,18 +125,11 @@ grab_port (MMPluginBase *base, return NULL; } - physdev = mm_plugin_base_supports_task_get_physdev (task); - g_assert (physdev); - sysfs_path = g_udev_device_get_sysfs_path (physdev); - if (!sysfs_path) { - g_set_error (error, 0, 0, "Could not get port's physical device sysfs path."); - return NULL; - } - subsys = g_udev_device_get_subsystem (port); name = g_udev_device_get_name (port); caps = mm_plugin_base_supports_task_get_probed_capabilities (task); + sysfs_path = mm_plugin_base_supports_task_get_physdev_path (task); if (!existing) { if (caps & MM_PLUGIN_BASE_PORT_CAP_GSM) { modem = mm_modem_novatel_gsm_new (sysfs_path, |