All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 3/3] hog: fix HoG reconnect handling in attio_connected_cb()
@ 2015-04-30 21:40 Petri Gynther
  0 siblings, 0 replies; only message in thread
From: Petri Gynther @ 2015-04-30 21:40 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: luiz.dentz

On HoG device reconnect, attio_connected_cb() should re-enable
HoG report notification callbacks for only those HoG reports that
have a valid CCC handle and notifications enabled on the device.

Note that the call:
enable_report_notifications(r, false)

only reinstalls the callback for HoG report notifications. It doesn't
rewrite the HoG report notification enable bit on the HoG device.
---
 profiles/input/hog.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/profiles/input/hog.c b/profiles/input/hog.c
index ff0c559..bb3f182 100644
--- a/profiles/input/hog.c
+++ b/profiles/input/hog.c
@@ -858,10 +858,7 @@ static void attio_connected_cb(GAttrib *attrib, gpointer user_data)
 	for (l = hogdev->reports; l; l = l->next) {
 		struct report *r = l->data;
 
-		r->notifyid = g_attrib_register(hogdev->attrib,
-					ATT_OP_HANDLE_NOTIFY,
-					r->decl->value_handle,
-					report_value_cb, r, NULL);
+		enable_report_notifications(r, false);
 	}
 }
 
-- 
2.2.0.rc0.207.ga3a616c


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-30 21:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-30 21:40 [PATCH v2 3/3] hog: fix HoG reconnect handling in attio_connected_cb() Petri Gynther

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.