On Wed, Jul 24, 2019 at 10:51:23AM +0900, Kuninori Morimoto wrote: > > From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> > > ALSA SoC is calling try_module_get()/module_put() based on > component->driver->module_get_upon_open. > To keep simple and readable code, we should create its function. > This patch adds new snd_soc_component_get/put(). > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> > --- > diff --git a/include/sound/soc-component.h b/include/sound/soc-component.h > index d2f94cf..57270c2 100644 > --- a/include/sound/soc-component.h > +++ b/include/sound/soc-component.h > @@ -279,6 +279,11 @@ void snd_soc_component_init_regmap(struct snd_soc_component *component, > void snd_soc_component_exit_regmap(struct snd_soc_component *component); > #endif > > +int snd_soc_component_module_get(struct snd_soc_component *component, > + int has_flags); > +void snd_soc_component_module_put(struct snd_soc_component *component, > + int has_flags); The name has_flags feels a little vague here, is the intention to support more flags in the future? Or would something like require_get_upon_open or something be better? Thanks, Charles _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx https://mailman.alsa-project.org/mailman/listinfo/alsa-devel