OSDN Git Service

ASoC: Intel: Skylake: Remove static table index when parsing topology
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Fri, 26 Jul 2019 09:09:29 +0000 (11:09 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 26 Jul 2019 16:09:35 +0000 (17:09 +0100)
commit096769ea95380ef3048765aef676e8947bc368d4
treecba6561a1779f259cd4cbdfadbae1e3dec546f3c
parentc8415833ec242b9ddf73bf9e1057e12f9b0fcd16
ASoC: Intel: Skylake: Remove static table index when parsing topology

Currently when we remove and reload driver we use previous ref_count
value to start iterating over skl->modules which leads to out of table
access. To fix this just inline the function and calculate indexes
everytime we parse UUID token.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190726090929.27946-2-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-topology.c