ASoC: soc-core: add component lookup functions
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 2 Oct 2017 05:09:52 +0000 (05:09 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 4 Oct 2017 11:27:18 +0000 (12:27 +0100)
commit7dd5d0d954611c05a38bdf843054c639f45ce08b
tree1e9e2017e3edea3aed231b3a8947565b0a388db0
parent7ba236ce58bd7ac8e360de81f834d9c446f7b063
ASoC: soc-core: add component lookup functions

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: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h
sound/soc/soc-core.c