]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit3249fff4d453c190445815b7b8f4f43207759ab5
tree1e9e2017e3edea3aed231b3a8947565b0a388db0
parent2b5e063b7d46372961fa83a62ba55206c4d0a8c7
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