diff options
author | Peter Ujfalusi <peter.ujfalusi@linux.intel.com> | 2021-09-14 15:53:56 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-09-15 13:12:28 +0100 |
commit | 96ec1741067dd73c6061c8f6ec1e9976aee5337b (patch) | |
tree | 42ab6deb39ef1c7c6832b6da2a0feda786978efe /sound/soc/sof/ops.h | |
parent | ce3f9357638720f4a78f6a6e481941c37f33bceb (diff) |
ASoC: SOF: loader: load_firmware callback is mandatory, treat it like that
Since the load_firmware callback in snd_sof_dsp_ops is mandatory and it
is tested during probe.
Move the snd_sof_load_firmware() wrapper to ops.h as inline and drop the
check of sof_ops(sdev)->load_firmware
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210914125356.19828-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/ops.h')
-rw-r--r-- | sound/soc/sof/ops.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/sof/ops.h b/sound/soc/sof/ops.h index 4a5d6e497f05..731b8157aaea 100644 --- a/sound/soc/sof/ops.h +++ b/sound/soc/sof/ops.h @@ -400,6 +400,14 @@ snd_sof_pcm_platform_trigger(struct snd_sof_dev *sdev, return 0; } +/* Firmware loading */ +static inline int snd_sof_load_firmware(struct snd_sof_dev *sdev) +{ + dev_dbg(sdev->dev, "loading firmware\n"); + + return sof_ops(sdev)->load_firmware(sdev); +} + /* host DSP message data */ static inline void snd_sof_ipc_msg_data(struct snd_sof_dev *sdev, struct snd_pcm_substream *substream, |