• Patrick Mochel's avatar
    [driver model] Add device_unregister_wait(). · 402f1b9f
    Patrick Mochel authored
    For those times when you need to wait for a device to unregister, before you
    continue on, this is device_unregister_wait(). It will block until all the
    references to the device go away, including references held by open sysfs
    files.
    
    This is probably most useful for modules that add and remove devices when
    they are loaded and unloaded. They must be sure that the devices that they
    have declared or allocated are completely torn down before the module is 
    removed, lest unfreed memory get referenced or called. 
    402f1b9f
core.c 9.88 KB