]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: imx-wm8962: Remove global variables
authorFabio Estevam <fabio.estevam@nxp.com>
Sun, 23 Apr 2017 23:20:33 +0000 (20:20 -0300)
committerMark Brown <broonie@kernel.org>
Mon, 24 Apr 2017 17:45:18 +0000 (18:45 +0100)
commitdb254f271bb0e22d54e4fb32b18f9e33cf963044
tree9a32136575eb08a63d2b535e772a6991e2721334
parentc2c3f0c797af7274a5dcad59cceb418c9924451a
ASoC: imx-wm8962: Remove global variables

Currently the following variables are global:
- card_priv, sample_rate and sample_format

,which is not a good idea as it prevents the usage of multiple
instances.

Make sample_rate and sample_format part of the imx_priv structure
and allocate imx_priv via the standard devm_kzalloc() mechanism
inside the probe function.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/imx-wm8962.c