From: Takashi Iwai Subject: Re: [PATCH] ASoC: soc-core: export function to find components Date: Tue, 18 Jun 2019 10:46:28 +0200 Message-ID: References: <1560844059-5897-1-git-send-email-bgoswami@codeaurora.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 125B5F896F4 for ; Tue, 18 Jun 2019 10:46:28 +0200 (CEST) In-Reply-To: <1560844059-5897-1-git-send-email-bgoswami@codeaurora.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" To: bgoswami@codeaurora.org Cc: alsa-devel@alsa-project.org, broonie@kernel.org, srinivas.kandagatla@linaro.org, plai@codeaurora.org List-Id: alsa-devel@alsa-project.org On Tue, 18 Jun 2019 09:47:38 +0200, bgoswami@codeaurora.org wrote: > > From: Banajit Goswami > > Drivers may need to use the ASoC core function to > find out whether a particular component is already > registered with ASoC core or not. > Export the function so that drivers can use it outside > of the file. > > Signed-off-by: Banajit Goswami > --- > include/sound/soc.h | 2 ++ > sound/soc/soc-core.c | 13 ++++++++++++- > 2 files changed, 14 insertions(+), 1 deletion(-) > > diff --git a/include/sound/soc.h b/include/sound/soc.h > index 482b4ea..def975f 100644 > --- a/include/sound/soc.h > +++ b/include/sound/soc.h > @@ -1405,6 +1405,8 @@ int snd_soc_component_update_bits_async(struct snd_soc_component *component, > void snd_soc_component_async_complete(struct snd_soc_component *component); > int snd_soc_component_test_bits(struct snd_soc_component *component, > unsigned int reg, unsigned int mask, unsigned int value); > +struct snd_soc_component *soc_find_component( > + const struct device_node *of_node, const char *name); > > /* component wide operations */ > int snd_soc_component_set_sysclk(struct snd_soc_component *component, > diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c > index 41c0cfa..50a9977 100644 > --- a/sound/soc/soc-core.c > +++ b/sound/soc/soc-core.c > @@ -741,7 +741,17 @@ int snd_soc_resume(struct device *dev) > static const struct snd_soc_dai_ops null_dai_ops = { > }; > > -static struct snd_soc_component *soc_find_component( > +/** > + * soc_find_component: find a component from component_list in ASoC core > + * > + * @of_node: of_node of the component to query. > + * @name: name of the component to query. > + * > + * function to find out if a component is already registered with ASoC core. > + * > + * Returns component handle for success, else NULL error. > + */ > +struct snd_soc_component *soc_find_component( > const struct device_node *of_node, const char *name) > { > struct snd_soc_component *component; > @@ -764,6 +774,7 @@ static struct snd_soc_component *soc_find_component( > > return NULL; > } > +EXPORT_SYMBOL(soc_find_component); Why not EXPORT_SYMBOL_GPL()? thanks, Takashi