Input: fix faulty XXinput_* calls
Dmitry Torokhov
maintainerPATCH 1/1 Input: fix faulty XXinput_* calls
From: Daniel Mack <[email protected]>
They've been introduced by 987a6c02 ("Input: switch to input_abs_*() access functions") and they appear to be some kind of debug left-over.
[Dmitry Torokhov: these are my fault - I added XX prefixes in places where
I wanted to do additional review of the code but failed to actually do that in these particular instances.]
---
drivers/input/joystick/amijoy.c | 2 +- drivers/input/keyboard/hil_kbd.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/input/joystick/amijoy.c +1 -1
@@ -139,7 +139,7 @@ static int __init amijoy_init(void) amijoy_dev[i]->keybit[BIT_WORD (BTN_LEFT )] =BIT_MASK (BTN_LEFT ) |BIT_MASK (BTN_MIDDLE ) |BIT_MASK (BTN_RIGHT );for (j =0 ; j <2 ; j++) { -XXinput_set_abs_params (amijoy_dev[i],ABS_X + j, +input_set_abs_params (amijoy_dev[i],ABS_X + j,-1 ,1 ,0 ,0 ); }
drivers/input/keyboard/hil_kbd.c +2 -2
@@ -235,7 +235,7 @@ static void hil_dev_handle_ptr_events(struct hil_dev *ptr)if (val <input_abs_min (dev,ABS_X + i))input_abs_set_min (dev,ABS_X + i, val);if (val >input_abs_max (dev,ABS_X + i)) -XXinput_abs_set_max (dev,ABS_X + i, val); +input_abs_set_max (dev,ABS_X + i, val);#endif if (i %3 ) val =input_abs_max (dev,ABS_X + i) - val;
@@ -391,7 +391,7 @@ static void hil_dev_pointer_setup(struct hil_dev *ptr)int diff =input_abs_max (input_dev,ABS_X + i) /10 ;input_abs_set_min (input_dev,ABS_X + i, input_abs_min(input_dev, ABS_X + i) + diff) - XXinput_abs_set_max(input_dev, ABS_X + i, + input_abs_set_max(input_dev, ABS_X + i, input_abs_max(input_dev, ABS_X + i) - diff) }#endif
Signature · 1 line
Dmitry
Quoted 9 lines · Dmitry Torokhov
From: Daniel Mack <[email protected]>
They've been introduced by
987a6c02("Input: switch to input_abs_*() access functions") and they appear to be some kind of debug left-over.[Dmitry Torokhov: these are my fault - I added XX prefixes in places where I wanted to do additional review of the code but failed to actually do that in these particular instances.]
Quoted 5 lines
Signed-off-by Daniel Mack <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>---
drivers/input/joystick/amijoy.c | 2 +-
Thanks, amijoy.c compiles now.
But hil_kbd.c still doesn't compile:
drivers/input/keyboard/hil_kbd.c static void hil_dev_handle_ptr_events(struct hil_dev *ptr) · line 237
Quoted 8 lines
drivers/input/keyboard/hil_kbd.c +0
-0@@ -235,7 +235,7 @@ static void hil_dev_handle_ptr_events(struct hil_dev *ptr) if (val < input_abs_min(dev, ABS_X + i)) input_abs_set_min(dev, ABS_X + i, val); if (val > input_abs_max(dev, ABS_X + i))
error: implicit declaration of function ‘input_abs_max’.
And indeed, input_abs_max() does not exist, while hil_kbd.c has 4 callers.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 32 lines · Geert Uytterhoeven
Quoted 9 lines · Dmitry Torokhov
From: Daniel Mack <[email protected]>
They've been introduced by
987a6c02("Input: switch to input_abs_*() access functions") and they appear to be some kind of debug left-over.[Dmitry Torokhov: these are my fault - I added XX prefixes in places where I wanted to do additional review of the code but failed to actually do that in these particular instances.]
Quoted 5 lines
Signed-off-by Daniel Mack <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>---
drivers/input/joystick/amijoy.c | 2 +-
Thanks,
amijoy.ccompiles now.But
hil_kbd.cstill doesn't compile:drivers/input/keyboard/hil_kbd.c static void hil_dev_handle_ptr_events(struct hil_dev *ptr) · line 237
Quoted 8 lines
drivers/input/keyboard/hil_kbd.c +0
-0@@ -235,7 +235,7 @@ static void hil_dev_handle_ptr_events(struct hil_dev *ptr) if (val < input_abs_min(dev, ABS_X + i)) input_abs_set_min(dev, ABS_X + i, val); if (val > input_abs_max(dev, ABS_X + i))error: implicit declaration of function ‘input_abs_max’.
Quoted 1 line
And indeed,
input_abs_max()does not exist, whilehil_kbd.chas 4 callers.
Ping? What should these input_abs_max() calls be?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoted 32 lines · Geert Uytterhoeven
Quoted 9 lines · Dmitry Torokhov
From: Daniel Mack <[email protected]>
They've been introduced by
987a6c02("Input: switch to input_abs_*() access functions") and they appear to be some kind of debug left-over.[Dmitry Torokhov: these are my fault - I added XX prefixes in places where I wanted to do additional review of the code but failed to actually do that in these particular instances.]
Quoted 5 lines
Signed-off-by Daniel Mack <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>---
drivers/input/joystick/amijoy.c | 2 +-
Thanks,
amijoy.ccompiles now.But
hil_kbd.cstill doesn't compile:drivers/input/keyboard/hil_kbd.c static void hil_dev_handle_ptr_events(struct hil_dev *ptr) · line 237
Quoted 8 lines
drivers/input/keyboard/hil_kbd.c +0
-0@@ -235,7 +235,7 @@ static void hil_dev_handle_ptr_events(struct hil_dev *ptr) if (val < input_abs_min(dev, ABS_X + i)) input_abs_set_min(dev, ABS_X + i, val); if (val > input_abs_max(dev, ABS_X + i))error: implicit declaration of function ‘input_abs_max’.
Quoted 1 line
And indeed,
input_abs_max()does not exist, whilehil_kbd.chas 4 callers.
Sorry about that. hil_kbd wasn't built on my system with an allmodconfig, as I just got to know. Below is a fix for this unfortunate trouble.
Thanks,
Daniel
Quoted 1 line
From
d3ff4d85516d5361aad42e9edddf9b4a99bc3dafMon Sep 17 00:00:00 2001
From: Daniel Mack <[email protected]>
Date: Tue, 17 Aug 2010 16:33:45 +0200
Subject: [PATCH] input: fix input_abs_get_max call sites
This is another search-and-replace mistake which I didn't notice as hil_kbd.c was not built by "make allmodconfig" on my system. Sorry for the trouble caused.
--- drivers/input/keyboard/hil_kbd.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/input/keyboard/hil_kbd.c +4 -4
@@ -234,11 +234,11 @@ static void hil_dev_handle_ptr_events(struct hil_dev *ptr)#ifdef TABLET_AUTOADJUST if (val <input_abs_min (dev,ABS_X + i))input_abs_set_min (dev,ABS_X + i, val); -if (val >input_abs_max (dev,ABS_X + i)) +if (val >input_abs_get_max (dev,ABS_X + i))input_abs_set_max (dev,ABS_X + i, val);#endif if (i %3 ) - val =input_abs_max (dev,ABS_X + i) - val; + val =input_abs_get_max (dev,ABS_X + i) - val;input_report_abs (dev,ABS_X + i, val); }else { val = (int ) (((int8_t ) lo) | ((int8_t ) hi <<8 ));
@@ -388,11 +388,11 @@ static void hil_dev_pointer_setup(struct hil_dev *ptr)#ifdef TABLET_AUTOADJUST for (i =0 ; i <ABS_MAX ; i++) { -int diff =input_abs_max (input_dev,ABS_X + i) /10 ; +int diff =input_abs_get_max (input_dev,ABS_X + i) /10 ;input_abs_set_min (input_dev,ABS_X + i, input_abs_min(input_dev, ABS_X + i) + diff)input_abs_set_max (input_dev,ABS_X + i, - input_abs_max(input_dev, ABS_X + i) - diff) + input_abs_get_max(input_dev, ABS_X + i) - diff) }#endif
Signature · 1 line
1.7.1
Dmitry Torokhov
maintainerQuoted 33 lines · Daniel Mack
Quoted 32 lines · Geert Uytterhoeven
Quoted 9 lines · Dmitry Torokhov
From: Daniel Mack <[email protected]>
They've been introduced by
987a6c02("Input: switch to input_abs_*() access functions") and they appear to be some kind of debug left-over.[Dmitry Torokhov: these are my fault - I added XX prefixes in places where I wanted to do additional review of the code but failed to actually do that in these particular instances.]
Quoted 5 lines
Signed-off-by Daniel Mack <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>---
drivers/input/joystick/amijoy.c | 2 +-
Thanks,
amijoy.ccompiles now.But
hil_kbd.cstill doesn't compile:drivers/input/keyboard/hil_kbd.c static void hil_dev_handle_ptr_events(struct hil_dev *ptr) · line 237
Quoted 8 lines
drivers/input/keyboard/hil_kbd.c +0
-0@@ -235,7 +235,7 @@ static void hil_dev_handle_ptr_events(struct hil_dev *ptr) if (val < input_abs_min(dev, ABS_X + i)) input_abs_set_min(dev, ABS_X + i, val); if (val > input_abs_max(dev, ABS_X + i))error: implicit declaration of function ‘input_abs_max’.
Quoted 6 lines
Quoted 1 line
And indeed,
input_abs_max()does not exist, whilehil_kbd.chas 4 callers.Sorry about that.
hil_kbdwasn't built on my system with an allmodconfig, as I just got to know. Below is a fix for this unfortunate trouble.
I think there still a couple of spots need to be adjusted. How about this one? (Sorry for the silence, I'm in the middle of a vacation).
Signature · 11 lines
Dmitry Input: hil_kbd - fix compile error From: Dmitry Torokhov <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> --- drivers/input/keyboard/hil_kbd.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
drivers/input/keyboard/hil_kbd.c +6 -6
@@ -232,13 +232,13 @@ static void hil_dev_handle_ptr_events(struct hil_dev *ptr)if (absdev) { val = lo + (hi <<8 );#ifdef TABLET_AUTOADJUST -if (val <input_abs_min (dev,ABS_X + i)) +if (val <input_abs_get_min (dev,ABS_X + i))input_abs_set_min (dev,ABS_X + i, val); -if (val >input_abs_max (dev,ABS_X + i)) +if (val >input_abs_get_max (dev,ABS_X + i))input_abs_set_max (dev,ABS_X + i, val);#endif if (i %3 ) - val =input_abs_max (dev,ABS_X + i) - val; + val =input_abs_get_max (dev,ABS_X + i) - val;input_report_abs (dev,ABS_X + i, val); }else { val = (int ) (((int8_t ) lo) | ((int8_t ) hi <<8 ));
@@ -388,11 +388,11 @@ static void hil_dev_pointer_setup(struct hil_dev *ptr)#ifdef TABLET_AUTOADJUST for (i =0 ; i <ABS_MAX ; i++) { -int diff =input_abs_max (input_dev,ABS_X + i) /10 ; +int diff =input_abs_get_max (input_dev,ABS_X + i) /10 ;input_abs_set_min (input_dev,ABS_X + i, - input_abs_min(input_dev, ABS_X + i) + diff) + input_abs_get_min(input_dev, ABS_X + i) + diff)input_abs_set_max (input_dev,ABS_X + i, - input_abs_max(input_dev, ABS_X + i) - diff) + input_abs_get_max(input_dev, ABS_X + i) - diff) }#endif
Dmitry Torokhov
maintainerQuoted 36 lines · Dmitry Torokhov
Quoted 35 lines · Daniel Mack
Quoted 33 lines · Geert Uytterhoeven
Quoted 9 lines · Dmitry Torokhov
From: Daniel Mack <[email protected]>
They've been introduced by
987a6c02("Input: switch to input_abs_*() access functions") and they appear to be some kind of debug left-over.[Dmitry Torokhov: these are my fault - I added XX prefixes in places where I wanted to do additional review of the code but failed to actually do that in these particular instances.]
Quoted 5 lines
Signed-off-by Daniel Mack <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>---
drivers/input/joystick/amijoy.c | 2 +-
Thanks,
amijoy.ccompiles now.But
hil_kbd.cstill doesn't compile:drivers/input/keyboard/hil_kbd.c static void hil_dev_handle_ptr_events(struct hil_dev *ptr) · line 237
Quoted 8 lines
drivers/input/keyboard/hil_kbd.c +0
-0@@ -235,7 +235,7 @@ static void hil_dev_handle_ptr_events(struct hil_dev *ptr) if (val < input_abs_min(dev, ABS_X + i)) input_abs_set_min(dev, ABS_X + i, val); if (val > input_abs_max(dev, ABS_X + i))error: implicit declaration of function ‘input_abs_max’.
And indeed,
input_abs_max()does not exist, whilehil_kbd.chas 4 callers.
Quoted 7 lines
Quoted 4 lines
Sorry about that.
hil_kbdwasn't built on my system with an allmodconfig, as I just got to know. Below is a fix for this unfortunate trouble.I think there still a couple of spots need to be adjusted. How about this one? (Sorry for the silence, I'm in the middle of a vacation).
And still there were more issues (missing semicolons, I think they were there for a long time as TABLET_AUTOADJUST is not normally defined). I have a fix that makes hil_kbd.c compile in my tree and I will post a pull request in a day or so.
Thanks.
Signature · 1 line
Dmitry
Quoted 8 lines · Dmitry Torokhov
Quoted 2 lines · Dmitry Torokhov
I think there still a couple of spots need to be adjusted. How about this one? (Sorry for the silence, I'm in the middle of a vacation).
And still there were more issues (missing semicolons, I think they were there for a long time as
TABLET_AUTOADJUSTis not normally defined). I have a fix that makeshil_kbd.ccompile in my tree and I will post a pull request in a day or so.
Ok, thanks a lot!
Daniel