[lug] pte_offset in a device driver isn't being found
D. Stimits
stimits at attbi.com
Fri Jun 20 21:59:59 MDT 2003
Michael J. Hammel wrote:
> I'm trying to compile a driver that is using pte_offset(). Linux Device
> Drivers says that include asm/page.h and asm/pgtable.h for this. I've
> added these (they were missing) but I still get "implicit declaration of
> function pte_offset" when I compile. The object compiles okay, but I
> want to clean this last warning up before trying the driver out.
>
> I'm including /usr/include and /usr/src/linux-/include in the
> header search path. I don't think that's the problem - it seems more
> like some defined value isn't getting set to make this function
> prototype visible in the header, though a glance through both page.h and
> pgtable.h doesn't show what that value might be.
>
> Any one have any ideas why I might be getting this? Jon Corbet - you
> around?
Doing a grep in my 2.4.19 kernel I see it defined as a macro in the
kernel source tree, /usr/src/linux-2.4/include/asm/pgtable.h. I see the
same #define in /usr/include/asm/pgtable.h. My guess would be that you
still get this warning if the #include <asm/pgtable.h> does not occur
prior to the first use, so make sure it is #include'd within the
complaining file prior to the line that claims the need (which might
need other #include's to be after this #include). I didn't check out all
of the condition #ifdef type declarations in the header, so maybe some
other definition (or lack of) is going to cause it to fail.
D. Stimits, stimits AT attbi DOT com
More information about the LUG
mailing list