20 Feb
2020
20 Feb
'20
5:01 a.m.
Hi Sridharan
> ASoC component open/close and snd_soc_component_module_get/put are > called once for each component, but we need it for each substream. > To solve this issue, this patch counts open / get, > and call close / put accordingly. > > Fixes: dd03907bf129 ("ASoC: soc-pcm: call snd_soc_component_open/close() once") > Reported-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > ---
(snip)
I think same as open ? It protects calling put() from not-get-component. Because module_put() has WARN_ON(ret < 0).
Can we use the module_refcount instead of adding a new field?
Ahh, maybe yes. I can try to use it in non-RFC patch.
Thank you for your help !! Best regards --- Kuninori Morimoto