summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/dell-wmi.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-14 11:13:54 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-14 11:13:54 -0700
commita818d8e43147f40864363456b37a00b819439307 (patch)
treec0a5139116747c2240f94c024e247a4efd1791c6 /drivers/platform/x86/dell-wmi.c
parentf901e753923192a7793e5d7591e2c03dcb252d68 (diff)
parent31968ecf584330b51a25b7bf881c2b632a02a3fb (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - add ALDI/MEDION netbook E1222 to qurik reset table Input: ALPS - fix stuck buttons on some touchpads Input: wm831x-on - convert to use genirq Input: ads7846 - add wakeup support Input: appletouch - fix integer overflow issue Input: ad7877 - increase pen up imeout Input: ads7846 - add support for AD7843 parts Input: bf54x-keys - fix system hang when pressing a key Input: alps - add support for the touchpad on Toshiba Tecra A11-11L Input: remove BKL, fix input_open_file() locking Input: serio_raw - remove BKL Input: mousedev - remove BKL Input: add driver for TWL4030 vibrator device Input: enable remote wakeup for PNP i8042 keyboard ports Input: scancode in get/set_keycodes should be unsigned Input: i8042 - use platfrom_create_bundle() helper Input: wacom - merge out and in prox events Input: gamecon - fix off by one range check Input: wacom - replace WACOM_PKGLEN_PENABLED
Diffstat (limited to 'drivers/platform/x86/dell-wmi.c')
-rw-r--r--drivers/platform/x86/dell-wmi.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
index 1b1dddbd574..bed764e3ea2 100644
--- a/drivers/platform/x86/dell-wmi.c
+++ b/drivers/platform/x86/dell-wmi.c
@@ -142,7 +142,7 @@ static struct key_entry *dell_wmi_keymap = dell_legacy_wmi_keymap;
static struct input_dev *dell_wmi_input_dev;
-static struct key_entry *dell_wmi_get_entry_by_scancode(int code)
+static struct key_entry *dell_wmi_get_entry_by_scancode(unsigned int code)
{
struct key_entry *key;
@@ -153,7 +153,7 @@ static struct key_entry *dell_wmi_get_entry_by_scancode(int code)
return NULL;
}
-static struct key_entry *dell_wmi_get_entry_by_keycode(int keycode)
+static struct key_entry *dell_wmi_get_entry_by_keycode(unsigned int keycode)
{
struct key_entry *key;
@@ -164,8 +164,8 @@ static struct key_entry *dell_wmi_get_entry_by_keycode(int keycode)
return NULL;
}
-static int dell_wmi_getkeycode(struct input_dev *dev, int scancode,
- int *keycode)
+static int dell_wmi_getkeycode(struct input_dev *dev,
+ unsigned int scancode, unsigned int *keycode)
{
struct key_entry *key = dell_wmi_get_entry_by_scancode(scancode);
@@ -177,13 +177,11 @@ static int dell_wmi_getkeycode(struct input_dev *dev, int scancode,
return -EINVAL;
}
-static int dell_wmi_setkeycode(struct input_dev *dev, int scancode, int keycode)
+static int dell_wmi_setkeycode(struct input_dev *dev,
+ unsigned int scancode, unsigned int keycode)
{
struct key_entry *key;
- int old_keycode;
-
- if (keycode < 0 || keycode > KEY_MAX)
- return -EINVAL;
+ unsigned int old_keycode;
key = dell_wmi_get_entry_by_scancode(scancode);
if (key && key->type == KE_KEY) {