Linux MIPS Architecture development
 help / color / mirror / Atom feed
* pckbd_rate
@ 2002-10-01  8:38 Mike Nugent
  0 siblings, 0 replies; only message in thread
From: Mike Nugent @ 2002-10-01  8:38 UTC (permalink / raw)
  To: linux-mips



I was compiling 2.4.18 and I ran into this (this was all done after the
symbolic links were set up to the mips directories):

When compiling /usr/src/kernel-source-2.4.18/drivers/char/keyboard.c:

Included in this order
#include <asm/keyboard.h>
...stuff...
#include <linux/vt_kern.h>

/usr/src/kernel-source-2.4.18/include/linux/vt_kern.h:35: `pckbd_rate'
redeclared as different kind of symbol
/usr/src/kernel-source-2.4.18/include/asm/keyboard.h:30: previous
declaration of `pckbd_rate'

in asm/keyboard.h
extern int pckbd_rate(struct kbd_repeat *rep);
#define kbd_rate                pckbd_rate

In that order, but, as I understand, the preprocessor will make a pass
and substitution before the c compiler is called so effectively
extern int kbd_rate(struct kbd_repeat *rep);

and in linux/vt_kern.h

extern int (*kbd_rate)(struct kbd_repeat *rep);

As you can see, the first is the variable and the second is a pointer. 
Which is right?

I commented out the pointer, chosen at random and crashed a bit later at
pc_keyb.c.  So I went back and commented out the first one.  Crashed in
the same place.  So I grabbed my keyboard.h from my 2.4.16 kernel and
copied it in.  It works fine.

Is this just me?

-- 
Mike Nugent
Programmer/Author
mike@illuminatus.org
"I believe the use of noise to make music will increase until we reach a
music produced through the aid of electrical instruments which will make
available for musical purposes any and all sounds that can be heard."
 -- composer John Cage, 1937

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-01  8:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-01  8:38 pckbd_rate Mike Nugent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox