To avoid multiple input syncs to be sent when parsing multiple peripheral inputs from the wiimote in future, we send the input-sync after handling all input events and not after parsing each value. This avoids waking up user-space handlers multiple times on a single incoming package. Signed-off-by: David Herrmann <dh.herrmann@xxxxxxxxxxxxxx> --- drivers/hid/hid-wiimote.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/hid/hid-wiimote.c b/drivers/hid/hid-wiimote.c index 859950e..bac4410 100644 --- a/drivers/hid/hid-wiimote.c +++ b/drivers/hid/hid-wiimote.c @@ -380,7 +380,6 @@ static void handler_keys(struct wiimote_data *wdata, const __u8 *payload) !!(payload[1] & 0x10)); input_report_key(wdata->input, wiiproto_keymap[WIIPROTO_KEY_HOME], !!(payload[1] & 0x80)); - input_sync(wdata->input); } static void handler_status(struct wiimote_data *wdata, const __u8 *payload) @@ -440,6 +439,7 @@ static int wiimote_hid_event(struct hid_device *hdev, struct hid_report *report, h->func(wdata, &raw_data[1]); } + input_sync(wdata->input); spin_unlock_irqrestore(&wdata->state.lock, flags); return 0; -- 1.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html