problem with compiler warnings
i am having two driver modules..
i have a "write_init" function inside first driver module.
i have given the following export option to export this function in kernel space..
Now i have used write_init function in second driver module. which is working properly. but while compiling the second driver module it showings compiler warnings below..
*** Warning: "write_init" undefined...
all the functionality is working though i need to overcome with this warnings any ideas.. i have given proper extern statements also...
Can you post your code? Or, a subset of it.
please see the code below...
i am having two modules say module A and module B..
In module A:
// module initialization....
// module exit code....
int write_init(int option, int value)
//Some code invocation... i have done it here...
In Module B:
here i am using that write_init(); guessing that while loading module kernel can find the function... because i have done EXPORT_SYMBOL_GPL(write_init);...
now the expected functionality is working fine...
Problem is while compiling Module B.. it shows warnings write_init undefined..
i have given the extern also.. but still showing the warnings..
This i need to rectify...
UR suggestion may helpfull to me..
I have never done a kernel module; but, from my experience I think the error you are getting means the function in not defined in a header file. For example:
Eventhough i have included the file moduleA's .h file. Also that moduleA's.h has extern of the write_init function. it didnt work properly..
So i am trying to find some other way..
Thanks for Reply... :)
|All times are GMT -5. The time now is 04:47 AM.|