mirror of https://github.com/thesofproject/sof.git
b08effa8e9
The current SOF architecture splits a "module" across two structs, the legacy comp_dev and a newer struct processing_module. The latter contains a pointer to the former, but in many places existing code has needed a backpointer to recover the module from a component. So far this has abused the drvdata mechanism to store this as a void*, but that's fragile as many components are already (!) using drvdata for other purposes and will clobber the setting. The fact that it worked is seeming just by luck. That pointer is for the exclusive use of the comp_driver code associated with a component to store its own data. We can't be touching it from the global module code. Just give the pointer a properly-typed field of its own and make sure the two are initialized in tandem. Longer term, SOF really needs to fix this bifurcation and unify the two structs. Signed-off-by: Andy Ross <andyross@google.com> |
||
---|---|---|
.. | ||
include | ||
m | ||
src | ||
CMakeLists.txt | ||
cmocka-host-gcc-toolchain.cmake | ||
cmocka-xtensa-gcc-toolchain.cmake | ||
cmocka-xtensa-xt-toolchain.cmake | ||
memory_mock.x.in |