• Kuninori Morimoto's avatar
    ASoC: soc-core: add component lookup functions · 7dd5d0d9
    Kuninori Morimoto authored
    ALSA SoC platform/codec will be replaced to component soon.
    This means 1 device might have multiple components. But current
    unregister component function only checks "dev" to find it.
    This means, unexpected component might be unregistered by current
    function.
    But, it is no problem if driver registered only 1 component.
    
    To prepare avoid this issue, this patch adds new component
    lookup function. it finds component by "dev" and "driver name".
    
    Here, the reason why it uses "driver name" is that "component name"
    was created by fmt_single_name() and difficult to use it from driver.
    Driver of course knows its "driver name", thus, using it is more easy.
    Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    7dd5d0d9
soc-core.c 113 KB