How to declare a Global Variable in Kernel
i want to declare a global variable in kernel.. and it should be accessed by all the modules. i will use this global variable to notify any error occurs while init_module of all device drivers.
i tried to declare the global variable in driver itself but i could not able to do it.. Can anyone tell me where i could declare the global variable in kernel,so that it could be accessed by all driver modules.. finally i can use an application to copy the status of all device drivers.. Please give me your suggestions |
Have you tried exporting symbols to kernel so that it can be accessed by all modules?
Try using EXPORT_SYMBOL/EXPORT_SYMBOL_GPL Thanks, |
All times are GMT -5. The time now is 01:00 PM. |