• Tomas Winkler's avatar
    mei: revamp open handler counts · 22f96a0e
    Tomas Winkler authored
    Make open counter to be incremented and decremented
    from mei_cl_link and mei_cl_unlik function respectively
    
    Nfc was assuming symmetric linking API and thus open handler
    count was never decreased. This patch fixes that.
    We need to add separate open hander count for amthif which
    is handled out of link/unlink functions and doesn't break
    the symmetric API.
    
    Last we do not waste clients slots if amthif or wd are not present
    in the device. we don't need to allocates slots ahead
    it is all covered by link/unlink before the devices is responding
    to user space connection and thus not racing on allocation
    Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    22f96a0e
mei_dev.h 15.8 KB