Can I unregister my driver if it's not a module

Can I unregister my driver if it's not a module

Post by Tony Denaul » Thu, 11 Nov 1999 04:00:00



Hi All,

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?

Thanks,

Tony

 
 
 

Can I unregister my driver if it's not a module

Post by Peter T. Breue » Fri, 12 Nov 1999 04:00:00


: 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

It would be better as a module.

: code during the shutdown? (Do I really need to make it a module?).

No .. you can put it in the module removal code, and call rmmod
in the shutdown sequence in rc.6. Make it an ioctl too, while you're
about it.

: Also, during shutdown does the kernel unregistered all modules?

No. I don't believe so. You will have to tell the system to.

Peter