option: fix reading port-specific setup file

The `physdev' stored in the probe is the sysfs path of the parent device, that
owning all ports. We need to build the setup file path using the port's sysfs
path instead.
This commit is contained in:
Aleksander Morgado
2012-03-26 12:56:18 +02:00
parent 46fa15c603
commit 5191dd3d9e

View File

@@ -79,7 +79,7 @@ grab_port (MMPluginBase *base,
}
}
sysfs_path = mm_port_probe_get_port_physdev (probe);
sysfs_path = g_udev_device_get_sysfs_path (port);
/* Detect AT port types */
if (g_str_equal (subsys, "tty")) {
@@ -99,7 +99,7 @@ grab_port (MMPluginBase *base,
/* If this is the first port being grabbed, create a new modem object */
if (!existing)
modem = MM_BASE_MODEM (mm_broadband_modem_hso_new (sysfs_path,
modem = MM_BASE_MODEM (mm_broadband_modem_hso_new (mm_port_probe_get_port_physdev (probe),
mm_port_probe_get_port_driver (probe),
mm_plugin_get_name (MM_PLUGIN (base)),
vendor,