core: new kernel device object instead of an explicit GUdevDevice
Instead of relying constantly on GUdevDevice objects reported by GUdev, we now use a new generic object (MMKernelDevice) for which we provide an initial GUdev based backend.
This commit is contained in:
@@ -110,7 +110,7 @@ grab_port (MMPlugin *self,
|
||||
MMPortProbe *probe,
|
||||
GError **error)
|
||||
{
|
||||
GUdevDevice *port;
|
||||
MMKernelDevice *port;
|
||||
MMPortSerialAtFlag pflags = MM_PORT_SERIAL_AT_FLAG_NONE;
|
||||
MMPortType ptype;
|
||||
|
||||
@@ -128,12 +128,12 @@ grab_port (MMPlugin *self,
|
||||
|
||||
if (mm_port_probe_is_at (probe)) {
|
||||
/* Look for port type hints */
|
||||
if (g_udev_device_get_property_as_boolean (port, "ID_MM_ZTE_PORT_TYPE_MODEM")) {
|
||||
if (mm_kernel_device_get_property_as_boolean (port, "ID_MM_ZTE_PORT_TYPE_MODEM")) {
|
||||
mm_dbg ("ZTE: AT port '%s/%s' flagged as primary",
|
||||
mm_port_probe_get_port_subsys (probe),
|
||||
mm_port_probe_get_port_name (probe));
|
||||
pflags = MM_PORT_SERIAL_AT_FLAG_PRIMARY;
|
||||
} else if (g_udev_device_get_property_as_boolean (port, "ID_MM_ZTE_PORT_TYPE_AUX")) {
|
||||
} else if (mm_kernel_device_get_property_as_boolean (port, "ID_MM_ZTE_PORT_TYPE_AUX")) {
|
||||
mm_dbg ("ZTE: AT port '%s/%s' flagged as secondary",
|
||||
mm_port_probe_get_port_subsys (probe),
|
||||
mm_port_probe_get_port_name (probe));
|
||||
@@ -141,7 +141,7 @@ grab_port (MMPlugin *self,
|
||||
}
|
||||
}
|
||||
|
||||
if (g_udev_device_get_property_as_boolean (port, "ID_MM_ZTE_ICERA_DHCP")) {
|
||||
if (mm_kernel_device_get_property_as_boolean (port, "ID_MM_ZTE_ICERA_DHCP")) {
|
||||
mm_dbg ("ZTE: Icera-based modem will use DHCP");
|
||||
g_object_set (modem,
|
||||
MM_BROADBAND_MODEM_ICERA_DEFAULT_IP_METHOD, MM_BEARER_IP_METHOD_DHCP,
|
||||
|
Reference in New Issue
Block a user