Re: need help with Linux IO.h include file



> I can see why virt-to-phys and phys-to-virt are causing a multiple
> definition, as these ARE
> callable routines.  But, I don't see why this is causing mutliple
> definitions of __inb, etc. as these
> appear to only be preprocessor defines, and anyway, aren't callable but
> inline, so the linker
> shouldn't have to know or worry about them.
> 
> Does anyone understand this particularly obscure bit of code enough to
> help me with this?

Jon,

This may not be the most elegant way, but try puting tests to see if
the macros have already been defined around the include directive, so
that it only includes io.h if they have not.  This kind of trick is
all over the EMC source for various reasons so you should be able to
find a model.

Also, the file to include has changed sometime between the 2.0.x
kernels and the present.

You might look at some of the multi-source-file drivers like smdromot
(or is it smdromod at that point?)  I don't have the code here at work
but could look at it later if someone else doesn't clear things up
first.

Chris


-- 
Christopher C. Stratton, stratton-at-mdc.net
Instrument Maker, Horn Player & Engineer
22 Adrian Street, Somerville, MA 02143
http://www.mdc.net/~stratton
NEW PHONE NUMBER: (617) 628-1062 home, 253-2606 MIT






Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact