On Mar 24, 2008, at 10:43 AM, Carlo Bertoldi wrote:
Well, in the first module I used EXPORT_SYMBOL() to export my function, and in the second one I have a function pointer to use it.
Not exactly. You would build the second module with a function prototype for the exported function. Then you just call it normally. It's just like using a function in a shared library. You don't need a function pointer.
(If you want to use a function pointer for some other reason you can do that too. But you still need the prototype for the actual exported function and you'd assign that to your FP.)
You also will need to ensure that the module doing the exporting is loaded successfully before you try to use the function and that it's not used again after unloading it.
-Mike -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ