On Tue, Dec 1, 2009 at 02:37, Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> wrote: > On Tue, Dec 01, 2009 at 02:28:06AM +0100, Kay Sievers wrote: >> On Tue, Dec 1, 2009 at 00:27, Johannes Stezenbach <js@xxxxxxxxx> wrote: >> > + strncat(fn, "/device/device/force_release", sizeof(fn)); >> >> You can only select a parent device by it's subsystem/devtype. Any >> hardcoded assumption about the order of parents is wrong, and the >> "device" link is deprecated, it must not appear anywhere in udev code. >> > > Maybe the quirk should fire up for /sys/device/platform/i8043/serioX > devices to begin with and not go backwards from the child event device? The hierarchy (/sys/devices/) of devices may change, for some device types even at runtime. It's usually not safe to make assumptions about the hierarchy. In this case it will probably never change for the platform devices, but it's still safer to lookup devices from the flat classification directories like: /sys/bus/serio/devices/serioX. Reaching the device from the child device should be as easy as: udev_device_get_parent_with_subsystem_devtype(..., "serio", NULL). Thanks, Kay -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html