From 6c5cb2e5869116c80b9f3736e821a0c7de056cfd Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 2 Feb 2017 16:04:43 +0100 Subject: [PATCH] compass: Change the device to which we should latch Instead of using the real "Lid Switch" device to attach our fake compass to, use "Power Button". "Lid Switch" will only be present on laptops, but "Power Button" is in both laptops and desktops, making it easier to test. --- src/drv-fake-compass.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drv-fake-compass.c b/src/drv-fake-compass.c index b3a9c87..900d197 100644 --- a/src/drv-fake-compass.c +++ b/src/drv-fake-compass.c @@ -34,8 +34,8 @@ fake_compass_discover (GUdevDevice *device) if (g_strcmp0 (g_udev_device_get_subsystem (device), "input") != 0) return FALSE; - /* "Lid switch" is a random input device to latch onto */ - if (g_strcmp0 (g_udev_device_get_property (device, "NAME"), "\"Lid Switch\"") != 0) + /* "Power Button" is a random input device to latch onto */ + if (g_strcmp0 (g_udev_device_get_property (device, "NAME"), "\"Power Button\"") != 0) return FALSE; g_debug ("Found fake compass at %s", g_udev_device_get_sysfs_path (device));