• Corey Minyard's avatar
    ipmi: Don't allow device module unload when in use · cbb79863
    Corey Minyard authored
    If something has the IPMI driver open, don't allow the device
    module to be unloaded.  Before it would unload and the user would
    get errors on use.
    
    This change is made on user request, and it makes it consistent
    with the I2C driver, which has the same behavior.
    
    It does change things a little bit with respect to kernel users.
    If the ACPI or IPMI watchdog (or any other kernel user) has
    created a user, then the device module cannot be unloaded.  Before
    it could be unloaded,
    
    This does not affect hot-plug.  If the device goes away (it's on
    something removable that is removed or is hot-removed via sysfs)
    then it still behaves as it did before.
    Reported-by: default avatartony camuso <tcamuso@redhat.com>
    Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
    Tested-by: default avatartony camuso <tcamuso@redhat.com>
    cbb79863
ipmi_msghandler.c 131 KB