ASoC: topology: Pass correct pointer instead of casting
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Fri, 27 Jan 2023 23:11:07 +0000 (00:11 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 30 Jan 2023 16:56:08 +0000 (16:56 +0000)
commit9e2ee00039a8ff236ae4db2366f4d2325658bea6
tree772a2e4ee6ffdaaf5e9b68e234f928d510f482f1
parent70a7cd09a6368e0c9d351185a8fbfb3bae5a74f3
ASoC: topology: Pass correct pointer instead of casting

Instead of passing address of structure, the containing structure is
cast to target structure. While it works - the expected structure is the
first field of containing one - it is bad practice, fix this by passing
pointer to structure field.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/20230127231111.937721-8-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-topology.c