Commit 96ec1741 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown

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: default avatarPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210914125356.19828-1-peter.ujfalusi@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent ce3f9357
......@@ -800,16 +800,6 @@ int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev)
}
EXPORT_SYMBOL(snd_sof_load_firmware_memcpy);
int snd_sof_load_firmware(struct snd_sof_dev *sdev)
{
dev_dbg(sdev->dev, "loading firmware\n");
if (sof_ops(sdev)->load_firmware)
return sof_ops(sdev)->load_firmware(sdev);
return 0;
}
EXPORT_SYMBOL(snd_sof_load_firmware);
int snd_sof_run_firmware(struct snd_sof_dev *sdev)
{
int ret;
......
......@@ -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,
......
......@@ -485,7 +485,6 @@ int snd_sof_create_page_table(struct device *dev,
/*
* Firmware loading.
*/
int snd_sof_load_firmware(struct snd_sof_dev *sdev);
int snd_sof_load_firmware_raw(struct snd_sof_dev *sdev);
int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev);
int snd_sof_run_firmware(struct snd_sof_dev *sdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment