Dmitry Torokhov wrote:
Hi Jarod,

On Thu, Jun 23, 2011 at 01:58:06PM -0400, Jarod Wilson wrote:
@@ -623,6 +624,7 @@ static void ir_do_keydown(struct rc_dev *dev, int scancode,
                          u32 keycode, u8 toggle)
  {
        input_event(dev->input_dev, EV_MSC, MSC_SCAN, scancode);
+       input_sync(dev->input_dev);

        /* Repeat event? */
        if (dev->keypressed&&

It looks like we would be issuing up to 3 input_sync() for a single
keypress... Order of events is wrong too (we first issue MSC_SCAN for
new key and then release old key). How about we change it a bit like in
the patch below?

Yeah, your patch does result in a nicer overall flow of things (esp. the ordering of the release, which I hadn't noticed), and eliminates the extra unnecessary syncs. I've got one tiny tweak, where I just pass a true/false to ir_do_keyup to say whether or not it should do a sync to further reduce some code duplication. Building and testing here locally to make sure it does behave as expected, will then send it along.

--
Jarod Wilson
ja...@redhat.com


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to