]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: pcm: update module refcount if module_get_upon_open is set
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Fri, 5 Apr 2019 16:57:09 +0000 (09:57 -0700)
committerMark Brown <broonie@kernel.org>
Mon, 8 Apr 2019 07:15:53 +0000 (14:15 +0700)
commita3ba47fd134b90b6b4e8b6621ade67c30b066b5e
tree406c5b8b435fb5c04ed39cb8560004e3516b1099
parent160b8813df4aaa631fee124960afc59756cfe498
ASoC: pcm: update module refcount if module_get_upon_open is set

Setting the module_get_upon_open field for component driver
prevents the module refcount from being incremented during
component probe(). This could lead to the module being
allowed to be unloaded when a pcm stream is open. So,
if this field is set, the module's refcount should be
incremented during pcm open to prevent module removal
when the component is in use. And, the refcount should
be decremented upon pcm close.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-pcm.c