diff mbox

[PATCHv3,1/6] ALSA: pcm: Export soc_dpcm_runtime_update

Message ID 20170725151030.26863-2-sebastian.reichel@collabora.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Sebastian Reichel July 25, 2017, 3:10 p.m. UTC
From: Tony Lindgren <tony@atomide.com>

Some codecs may need to use this from loadable modules. Without
this patch compilation for this kind of codec will fail with the
following error:

ERROR: "soc_dpcm_runtime_update" [sound/soc/codecs/snd-soc-cpcap.ko]
undefined!

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
 sound/soc/soc-pcm.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Takashi Iwai July 25, 2017, 3:42 p.m. UTC | #1
On Tue, 25 Jul 2017 17:10:25 +0200,
Sebastian Reichel wrote:
> 
> From: Tony Lindgren <tony@atomide.com>
> 
> Some codecs may need to use this from loadable modules. Without
> this patch compilation for this kind of codec will fail with the
> following error:
> 
> ERROR: "soc_dpcm_runtime_update" [sound/soc/codecs/snd-soc-cpcap.ko]
> undefined!
> 
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

If you do export the function, please make its comments prettier, so
that it appears in kernel documentation properly as an API function.

Also, in general, we use snd_ prefix for the exported stuff.
You'd need to rename it accordingly, too.

Last but not least, this is specific to ASoC, so use "ASoC" prefix to
the subject line.


thanks,

Takashi

> ---
>  sound/soc/soc-pcm.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> index dcc5ece08668..4de7d86ea6fb 100644
> --- a/sound/soc/soc-pcm.c
> +++ b/sound/soc/soc-pcm.c
> @@ -2539,6 +2539,8 @@ int soc_dpcm_runtime_update(struct snd_soc_card *card)
>  	mutex_unlock(&card->mutex);
>  	return 0;
>  }
> +EXPORT_SYMBOL_GPL(soc_dpcm_runtime_update);
> +
>  int soc_dpcm_be_digital_mute(struct snd_soc_pcm_runtime *fe, int mute)
>  {
>  	struct snd_soc_dpcm *dpcm;
> -- 
> 2.13.2
> 
>
Mark Brown July 26, 2017, 11:38 a.m. UTC | #2
On Tue, Jul 25, 2017 at 05:42:59PM +0200, Takashi Iwai wrote:

> Last but not least, this is specific to ASoC, so use "ASoC" prefix to
> the subject line.

Right, that's a good way to get the patch skipped in review :(
Sebastian Reichel July 27, 2017, 10:01 a.m. UTC | #3
Hi,

On Tue, Jul 25, 2017 at 05:42:59PM +0200, Takashi Iwai wrote:
> On Tue, 25 Jul 2017 17:10:25 +0200,
> Sebastian Reichel wrote:
> > Some codecs may need to use this from loadable modules. Without
> > this patch compilation for this kind of codec will fail with the
> > following error:
> > 
> > ERROR: "soc_dpcm_runtime_update" [sound/soc/codecs/snd-soc-cpcap.ko]
> > undefined!
> > 
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
> 
> If you do export the function, please make its comments prettier, so
> that it appears in kernel documentation properly as an API function.
> 
> Also, in general, we use snd_ prefix for the exported stuff.
> You'd need to rename it accordingly, too.
> 
> Last but not least, this is specific to ASoC, so use "ASoC" prefix to
> the subject line.

After fixing this locally I noticed, that I no longer need to call
soc_dpcm_runtime_update at all and it can remain private. So this
patch will be dropped in v4.

-- Sebastian
diff mbox

Patch

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index dcc5ece08668..4de7d86ea6fb 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2539,6 +2539,8 @@  int soc_dpcm_runtime_update(struct snd_soc_card *card)
 	mutex_unlock(&card->mutex);
 	return 0;
 }
+EXPORT_SYMBOL_GPL(soc_dpcm_runtime_update);
+
 int soc_dpcm_be_digital_mute(struct snd_soc_pcm_runtime *fe, int mute)
 {
 	struct snd_soc_dpcm *dpcm;