Merge branch 'cleanups' into 'main'

More cleanups

See merge request Librem5/feedbackd!80
This commit is contained in:
Guido Gunther
2022-11-11 09:50:28 +00:00
2 changed files with 14 additions and 13 deletions
+2 -2
View File
@@ -84,7 +84,7 @@ device_changes (FbdFeedbackManager *self, gchar *action, GUdevDevice *device,
g_clear_object (&self->vibra); g_clear_object (&self->vibra);
} }
} else if (g_strcmp0 (action, "add") == 0) { } else if (g_strcmp0 (action, "add") == 0) {
if (!g_strcmp0 (g_udev_device_get_property (device, "FEEDBACKD_TYPE"), "vibra")) { if (!g_strcmp0 (g_udev_device_get_property (device, FEEDBACKD_UDEV_ATTR), "vibra")) {
g_autoptr (GError) err = NULL; g_autoptr (GError) err = NULL;
g_debug ("Found hotplugged vibra device at %s", g_udev_device_get_sysfs_path (device)); g_debug ("Found hotplugged vibra device at %s", g_udev_device_get_sysfs_path (device));
@@ -139,7 +139,7 @@ init_devices (FbdFeedbackManager *self)
for (l = devices; l != NULL; l = l->next) { for (l = devices; l != NULL; l = l->next) {
GUdevDevice *dev = l->data; GUdevDevice *dev = l->data;
if (!g_strcmp0 (g_udev_device_get_property (dev, "FEEDBACKD_TYPE"), "vibra")) { if (!g_strcmp0 (g_udev_device_get_property (dev, FEEDBACKD_UDEV_ATTR), "vibra")) {
g_debug ("Found vibra device"); g_debug ("Found vibra device");
self->vibra = fbd_dev_vibra_new (dev, &err); self->vibra = fbd_dev_vibra_new (dev, &err);
if (!self->vibra) { if (!self->vibra) {
+2 -1
View File
@@ -18,7 +18,8 @@
static GMainLoop *loop; static GMainLoop *loop;
GQuark fbd_error_quark(void) GQuark
fbd_error_quark (void)
{ {
static GQuark quark = 0; static GQuark quark = 0;