• Russell King's avatar
    component: add support for releasing match data · ce657b1c
    Russell King authored
    The component helper treats the void match data pointer as an opaque
    object which needs no further management.  When device nodes being
    passed, this is not true: the caller should pass its refcount to the
    component helper, and there should be a way to drop the refcount when
    the matching information is destroyed.
    
    This patch provides a per-match release method in addition to the match
    method to solve this issue.  Rather than using component_match_add(),
    users should use component_match_add_release() which takes an additional
    function pointer for releasing this reference.
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    ce657b1c
component.c 11.7 KB