From b64b640d42e160fb37670ab4bddec59b92915a3b Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 24 Jul 2014 18:26:28 +0300 Subject: [PATCH] input: Remove broken UHID_FEATURE support The forward_report function currently assumes that all events it gets are of UHID_OUTPUT type. Simply remove trying to use it for anything else until we have a proper patch for UHID_FEATURE handling. --- profiles/input/hog.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/profiles/input/hog.c b/profiles/input/hog.c index 37533434c..491f93382 100644 --- a/profiles/input/hog.c +++ b/profiles/input/hog.c @@ -340,16 +340,10 @@ static void forward_report(struct uhid_event *ev, void *user_data) size = ev->u.output.size; } - switch (ev->type) { - case UHID_OUTPUT: - type = HOG_REPORT_TYPE_OUTPUT; - break; - case UHID_FEATURE: - type = HOG_REPORT_TYPE_FEATURE; - break; - default: + if (ev->type != UHID_OUTPUT) return; - } + + type = HOG_REPORT_TYPE_OUTPUT; l = g_slist_find_custom(hogdev->reports, GUINT_TO_POINTER(type), report_type_cmp); @@ -512,7 +506,6 @@ static void report_map_read_cb(guint8 status, const guint8 *pdu, guint16 plen, } bt_uhid_register(hogdev->uhid, UHID_OUTPUT, forward_report, hogdev); - bt_uhid_register(hogdev->uhid, UHID_FEATURE, forward_report, hogdev); } static void info_read_cb(guint8 status, const guint8 *pdu, guint16 plen, -- 2.47.3