public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] input: fix wiring up default setkeycode/setkeycodebig
@ 2010-07-16 17:23 Jarod Wilson
  0 siblings, 0 replies; only message in thread
From: Jarod Wilson @ 2010-07-16 17:23 UTC (permalink / raw)
  To: linux-media; +Cc: linux-input

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


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

only message in thread, other threads:[~2010-07-16 17:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-16 17:23 [PATCH] input: fix wiring up default setkeycode/setkeycodebig Jarod Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox