mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
Input: scancode in get/set_keycodes should be unsigned
The HID layer has some scan codes of the form 0xffbc0000 for logitech devices which do not work if scancode is typed as signed int, so we need to switch to unsigned it instead. While at it keycode being signed does not make much sense either. Acked-by: Márton Németh <[email protected]> Acked-by: Matthew Garrett <[email protected]> Acked-by: Jiri Kosina <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
This commit is contained in:
parent
ec62e1c8dd
commit
58b939959d
14 changed files with 88 additions and 94 deletions
|
|
@ -123,7 +123,7 @@ static int ir_copy_table(struct ir_scancode_table *destin,
|
|||
* If the key is not found, returns -EINVAL, otherwise, returns 0.
|
||||
*/
|
||||
static int ir_getkeycode(struct input_dev *dev,
|
||||
int scancode, int *keycode)
|
||||
unsigned int scancode, unsigned int *keycode)
|
||||
{
|
||||
int elem;
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(dev);
|
||||
|
|
@ -291,7 +291,7 @@ static int ir_insert_key(struct ir_scancode_table *rc_tab,
|
|||
* If the key is not found, returns -EINVAL, otherwise, returns 0.
|
||||
*/
|
||||
static int ir_setkeycode(struct input_dev *dev,
|
||||
int scancode, int keycode)
|
||||
unsigned int scancode, unsigned int keycode)
|
||||
{
|
||||
int rc = 0;
|
||||
struct ir_input_dev *ir_dev = input_get_drvdata(dev);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <linux/usb/input.h>
|
||||
|
||||
static int dvb_usb_getkeycode(struct input_dev *dev,
|
||||
int scancode, int *keycode)
|
||||
unsigned int scancode, unsigned int *keycode)
|
||||
{
|
||||
struct dvb_usb_device *d = input_get_drvdata(dev);
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ static int dvb_usb_getkeycode(struct input_dev *dev,
|
|||
}
|
||||
|
||||
static int dvb_usb_setkeycode(struct input_dev *dev,
|
||||
int scancode, int keycode)
|
||||
unsigned int scancode, unsigned int keycode)
|
||||
{
|
||||
struct dvb_usb_device *d = input_get_drvdata(dev);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue