Messages in this thread | | | From | Paul Sargent <> | Subject | Module.h and multiple files | Date | Mon, 14 Jun 1999 17:53:10 +0100 |
| |
Hi there,
I'm starting to get some module code together, but I've hit a hole in my understanding of how the header files are ment to be used.
My module supports several different types of interface at different minor numbers. (e.g. 0 is a memory block, 1 is a fifo, etc...), therefore I've got different file_operations tables for the different minor devices pointing to different Open, Release, read and write methods.
Now to structure my code a bit I deciced to have each of the interfaces have all its file methods in a different C file. Trouble is in each file there is a Open method which uses INC_MOD_USE_COUNT and a release method which uses DEC_MOD_USE_COUNT. Now to get these it seems I have to #include module.h, but if I do that I get linker errors on multiple instances of __module_kernel_version.
Suggestions please!! (Thank you)
Paul
P.S. Any documentation on the new 2.2 pread and pwrite methods anywhere (I've read Richard Gooch's API changes page, but I was looking for a little more info)
P.P.S I'm not suscribed so I'd appreciate a cc to me (Otherwise I'll have to trawl the archives for responses)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |