From 00fb9e98f6003f6b167f7d12a895ec3d1402b027 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 6 Mar 2017 12:01:56 +0100 Subject: kernel-device: device-specific properties in either port or physdev There are 2 main types of udev properties: device-specific and port-specific. The port-specific properties are set independently per port (e.g. port type hints set per interface number for a given vid:pid). The device-specific properties apply to all ports in the device. Some of these properties are currently expected in the physical device (e.g. ID_MM_PLATFORM_DRIVER_PROBE) while some others are expected in each port (e.g. the plugin udev tag filters). This patch tries to simplify the logic and just assume that the device specific tags may be given in either the physical device or the port device, by providing separate APIs to retrieve port-specific or device-specific (global) properties. If the same tag is given in both the device and the port, the one in the device takes preference. For the generic backend, these new APIs are really useless, as all device-specific and port-specific properties are always stored in the port object themselves (there is no 'tree' of devices in the generic backend, no 'physdev' device). For the udev backend, though, there really is a difference, as the tags may be set in port or device. https://bugs.freedesktop.org/show_bug.cgi?id=100156 --- plugins/simtech/mm-plugin-simtech.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/simtech/mm-plugin-simtech.c') diff --git a/plugins/simtech/mm-plugin-simtech.c b/plugins/simtech/mm-plugin-simtech.c index 54544aa0..b150868f 100644 --- a/plugins/simtech/mm-plugin-simtech.c +++ b/plugins/simtech/mm-plugin-simtech.c @@ -98,7 +98,7 @@ grab_port (MMPlugin *self, * to show up with more than two AT-capable ports. */ if (pflags == MM_PORT_SERIAL_AT_FLAG_NONE && - mm_kernel_device_get_property_as_boolean (port, "ID_MM_SIMTECH_TAGGED")) + mm_kernel_device_get_global_property_as_boolean (port, "ID_MM_SIMTECH_TAGGED")) ptype = MM_PORT_TYPE_IGNORED; } -- cgit v1.2.3-70-g09d2