I wrote a char device driver that is installed by compiling it
into the kernel. This was before module device drivers were common.
This driver is for a motor controller that uses shared memory for
passing commands and reply from the host to the controller. We
discovered that when we reboot the system, the controller 're-read' some
commands in the memory buffer. This is bad.
I am able to call a driver function during bootup by calling it in
mem.c. Is there a way to get the kernel to call a function in my driver
code during the shutdown? (Do I really need to make it a module?).
Also, during shutdown does the kernel unregistered all modules?