git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'hid-suspend' into picolcd
[pandora-kernel.git]
/
drivers
/
input
/
misc
/
ati_remote2.c
diff --git
a/drivers/input/misc/ati_remote2.c
b/drivers/input/misc/ati_remote2.c
index
0501f0e
..
2124b99
100644
(file)
--- a/
drivers/input/misc/ati_remote2.c
+++ b/
drivers/input/misc/ati_remote2.c
@@
-10,6
+10,7
@@
*/
#include <linux/usb/input.h>
*/
#include <linux/usb/input.h>
+#include <linux/slab.h>
#define DRIVER_DESC "ATI/Philips USB RF remote driver"
#define DRIVER_VERSION "0.3"
#define DRIVER_DESC "ATI/Philips USB RF remote driver"
#define DRIVER_VERSION "0.3"
@@
-474,10
+475,11
@@
static void ati_remote2_complete_key(struct urb *urb)
}
static int ati_remote2_getkeycode(struct input_dev *idev,
}
static int ati_remote2_getkeycode(struct input_dev *idev,
-
int scancode,
int *keycode)
+
unsigned int scancode, unsigned
int *keycode)
{
struct ati_remote2 *ar2 = input_get_drvdata(idev);
{
struct ati_remote2 *ar2 = input_get_drvdata(idev);
- int index, mode;
+ unsigned int mode;
+ int index;
mode = scancode >> 8;
if (mode > ATI_REMOTE2_PC || !((1 << mode) & ar2->mode_mask))
mode = scancode >> 8;
if (mode > ATI_REMOTE2_PC || !((1 << mode) & ar2->mode_mask))
@@
-491,10
+493,12
@@
static int ati_remote2_getkeycode(struct input_dev *idev,
return 0;
}
return 0;
}
-static int ati_remote2_setkeycode(struct input_dev *idev, int scancode, int keycode)
+static int ati_remote2_setkeycode(struct input_dev *idev,
+ unsigned int scancode, unsigned int keycode)
{
struct ati_remote2 *ar2 = input_get_drvdata(idev);
{
struct ati_remote2 *ar2 = input_get_drvdata(idev);
- int index, mode, old_keycode;
+ unsigned int mode, old_keycode;
+ int index;
mode = scancode >> 8;
if (mode > ATI_REMOTE2_PC || !((1 << mode) & ar2->mode_mask))
mode = scancode >> 8;
if (mode > ATI_REMOTE2_PC || !((1 << mode) & ar2->mode_mask))
@@
-504,9
+508,6
@@
static int ati_remote2_setkeycode(struct input_dev *idev, int scancode, int keyc
if (index < 0)
return -EINVAL;
if (index < 0)
return -EINVAL;
- if (keycode < KEY_RESERVED || keycode > KEY_MAX)
- return -EINVAL;
-
old_keycode = ar2->keycode[mode][index];
ar2->keycode[mode][index] = keycode;
__set_bit(keycode, idev->keybit);
old_keycode = ar2->keycode[mode][index];
ar2->keycode[mode][index] = keycode;
__set_bit(keycode, idev->keybit);