ASoC: SOF: Add helper macro to be used to get an IPC ops
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Wed, 21 Dec 2022 10:23:20 +0000 (12:23 +0200)
committerMark Brown <broonie@kernel.org>
Sun, 25 Dec 2022 23:32:31 +0000 (23:32 +0000)
commitcaf0f4662e07fcc721d1c85af82aa8a7d57621f3
treedbd7e1809aa5806e2a3fa5a9aad853de1f042f96
parent7cbb15593223e1fa56717fd33222c9a804162d70
ASoC: SOF: Add helper macro to be used to get an IPC ops

In preparation to a case when the DSP is not used.
In this case the IPC communication itself has no meaning and we might
not even have sdev->ipc allocated at all.

The sof_ipc_get_ops() macro can be used to get a named IPC ops struct or
return NULL if the sdev->ipc is not allocated.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20221221102328.9635-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/sof-priv.h