port: store parent sysfs path in each MMPort

This commit is contained in:
Aleksander Morgado
2014-06-22 17:29:50 +02:00
parent 7752c9920d
commit 7c347aa3ec
20 changed files with 75 additions and 18 deletions

View File

@@ -162,6 +162,7 @@ gboolean
mm_base_modem_grab_port (MMBaseModem *self,
const gchar *subsys,
const gchar *name,
const gchar *parent_path,
MMPortType ptype,
MMPortSerialAtFlag at_pflags,
GError **error)
@@ -306,6 +307,11 @@ mm_base_modem_grab_port (MMBaseModem *self,
* Note: 'key' and 'port' now owned by the HT. */
g_hash_table_insert (self->priv->ports, key, port);
/* Store parent path */
g_object_set (port,
MM_PORT_PARENT_PATH, parent_path,
NULL);
return TRUE;
}