On Wed, Jan 21, 2009 at 05:03:20PM +0200, Andriy Gapon wrote:
> 
> Do I need to code for MOD_UNLOAD for driver module that also creates a cdev?
> I see in the current code that one strategy is to simply call
> destroy_dev(). I guess detach routines are called automatically and
> destroy_dev can be done there as well..
What are the detach routines ? Do you mean newbus device detach ?

Yes, the usual strategy is to call destroy_dev from unload handler.

> 
> Is it reasonable to refuse unload if cdev is in use (in MOD_QUIESCE)?
> How to check for that best?

This cannot be checked race-free.

Attachment: pgppoux7zyErg.pgp
Description: PGP signature

Reply via email to