Thread (2 messages) flat view 2 messages, 2 authors, 2021-03-16
STALE2014d

[PATCH Bluez] android/handsfree: Replace g_timeout_add_seconds_full by g_timeout_add_seconds

From: Frédéric Danis <hidden>
Date: 2021-03-16 13:29:40
Subsystem: the rest · Maintainer: Linus Torvalds

The call uses the default priority value and doe not set a destroy
function, in this case g_timeout_add_seconds can be used.
---
 android/handsfree.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/android/handsfree.c b/android/handsfree.c
index 2365356c2..977803111 100644
--- a/android/handsfree.c
+++ b/android/handsfree.c
@@ -2330,9 +2330,7 @@ static void phone_state_incoming(struct hf_device *dev, int num_active,
 	/* send first RING */
 	ring_cb(dev);
 
-	dev->ring = g_timeout_add_seconds_full(G_PRIORITY_DEFAULT,
-							RING_TIMEOUT, ring_cb,
-							dev, NULL);
+	dev->ring = g_timeout_add_seconds(RING_TIMEOUT, ring_cb, dev);
 	if (!dev->ring) {
 		g_free(dev->clip);
 		dev->clip = NULL;
-- 
2.18.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help