Preventing the kernel service stop

Hello again,
I have a kernel device driver that should not be stopped in certain phases
of its life, basically when one of the devices that it handles is in the
open
state. It has its DriverUnload routine but I want (should I say I would
like)
it to be called only when the driver is idle.
Is there any means to notify the system about the ability to handle
a service stop as there is for ring3 services via the service control
manager?
Thanks in advance,
Marco