Skip to contentSkip to conversation

2.5.28 (linus' bk): conflicting KEY_xxx macros

DISCUSSION Alex Riesen 4 participants 4 messages Jul 24, 2002

lore
Share & tools
lore
#0 lore raw

include/linux/input.h has this:

#define KEY_PLAY 207
#define KEY_FASTFORWARD 208

#define KEY_PLAY 0x197
#define KEY_FASTFORWARD 0x19b

which one is where?

CC drivers/input/input.o

                 from input.c:31:

In file included from input.c:32:
include/linux/input.h:457: warning: KEY_PLAY' redefined include/linux/input.h:310: warning: this is the location of the previous definition include/linux/input.h:461: warning: KEY_FASTFORWARD' redefined include/linux/input.h:311: warning: this is the location of the previous definition

#1 lore raw
Quoted 9 lines · Alex Riesen

include/linux/input.h has this:

#define KEY_PLAY 207
#define KEY_FASTFORWARD 208

#define KEY_PLAY 0x197
#define KEY_FASTFORWARD 0x19b

which one is where?

The second ones override the first ones, so we just drop the first ones (since the seconds seem to have worked well for some time):

--- linus-2.5/include/linux/input.h 2002-07-16 10:01:54.000000000
-0600
+++ thunder-2.5/include/linux/input.h 2002-07-24 08:55:53.000000000
-0600
@@ -307,8 +307,6 @@

 #define KEY_PROG4              203
 #define KEY_SUSPEND            205
 #define KEY_CLOSE              206
-#define KEY_PLAY               207
-#define KEY_FASTFORWARD                208
 #define KEY_BASSBOOST          209
 #define KEY_PRINT              210
 #define KEY_HP                 211

Regards, Thunder

Signature · 7 lines
(Use http://www.ebb.org/ungeek if you can't decode)
------BEGIN GEEK CODE BLOCK------
Version: 3.12
GCS/E/G/S/AT d- s++:-- a? C++$ ULAVHI++++$ P++$ L++++(+++++)$ E W-$
N--- o?  K? w-- O- M V$ PS+ PE- Y- PGP+ t+ 5+ X+ R- !tv b++ DI? !D G
e++++ h* r--- y- 
------END GEEK CODE BLOCK------
#2 lore raw

I poked around at this with revtool trying to figure out what the intent was. It seems like the keys were all decimal, then at 0x100 it switched to BTN_*, then on Jul 13 Vojtech added a change for settop boxes which used the 0x160 .. range for more KEY_*. For whatever that is worth.

Signature · 2 lines
---
Larry McVoy            	 lm at bitmover.com           http://www.bitmover.com/lm 
#3 lore raw
Quoted 4 lines · Larry McVoy

I poked around at this with revtool trying to figure out what the intent was. It seems like the keys were all decimal, then at 0x100 it switched to BTN_*, then on Jul 13 Vojtech added a change for settop boxes which used the 0x160 .. range for more KEY_*. For whatever that is worth.

Yes, and I didn't review the change well enough and didn't see the conflicting definitions. In the next update they're OK again, but that hasn't made it into Linus's kernel yet.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs