public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarod Wilson <jarod@redhat.com>
To: linux-media@vger.kernel.org
Cc: linux-input@vger.kernel.org
Subject: [PATCH] input: fix wiring up default setkeycode/setkeycodebig
Date: Fri, 16 Jul 2010 13:23:51 -0400	[thread overview]
Message-ID: <20100716172351.GA4364@redhat.com> (raw)

I believe there's a mistake in 94977ff15f4214ee4630cf4a67195a1d48da771c,
where the conditions on which to set a setkeycodebig function are
incorrect. Previously, we had the case where if the dev didn't provide
its own setkeycode, we'd set the default input layer one. Now, we set
setkeycode big if the dev provides its own setkeycode but doesn't
provide setkeycodebig. Devices that provide neither setkeycode nor
setkeycodebig wind up with neither, which blows up horribly later on
down the road when a setkeycode{,big} operation is attempted. Such is
the case with the thinkpad_acpi driver's input device registered for the
extra hotkey buttons on my own t61. This makes it happy again, and seems
to be an obvious fix for a thinko.

Oh yeah, patch is against the linuxtv staging/other tree, not sure where
else the previously referenced hash can be found just yet.

Signed-off-by: Jarod Wilson <jarod@redhat.com>
---
 drivers/input/input.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/input.c b/drivers/input/input.c
index 43aeb71..ce5d90d 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1850,7 +1850,7 @@ int input_register_device(struct input_dev *dev)
 			dev->getkeycodebig_from_scancode = input_default_getkeycode_from_scancode;
 	}
 
-	if (dev->setkeycode) {
+	if (!dev->setkeycode) {
 		if (!dev->setkeycodebig)
 			dev->setkeycodebig = input_default_setkeycode;
 	}
-- 
1.7.1.1


-- 
Jarod Wilson
jarod@redhat.com


                 reply	other threads:[~2010-07-16 17:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100716172351.GA4364@redhat.com \
    --to=jarod@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox