mirror of
https://github.com/torvalds/linux.git
synced 2026-04-25 18:12:26 -04:00
ASoC: SOF: Simplify sof_probe_complete handling for acpi/pci/of
Set the sof_data->sof_probe_complete callback unconditionally of CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE. The sof_probe_complete will be called when the sof_probe_continue() function is successfully executed, called either directly from snd_sof_device_probe() or from the scheduled work. Since all error cases within the call chain of snd_sof_device_probe() have error prints, there is no need to print again in the acpi/pci/of level. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20210409220959.1543456-3-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
3bcae98e10
commit
4d1284cd79
@@ -71,7 +71,6 @@ static int sof_of_probe(struct platform_device *pdev)
|
||||
const struct sof_dev_desc *desc;
|
||||
struct snd_sof_pdata *sof_pdata;
|
||||
const struct snd_sof_dsp_ops *ops;
|
||||
int ret;
|
||||
|
||||
dev_info(&pdev->dev, "DT DSP detected");
|
||||
|
||||
@@ -98,22 +97,11 @@ static int sof_of_probe(struct platform_device *pdev)
|
||||
sof_pdata->fw_filename_prefix = sof_pdata->desc->default_fw_path;
|
||||
sof_pdata->tplg_filename_prefix = sof_pdata->desc->default_tplg_path;
|
||||
|
||||
#if IS_ENABLED(CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE)
|
||||
/* set callback to enable runtime_pm */
|
||||
/* set callback to be called on successful device probe to enable runtime_pm */
|
||||
sof_pdata->sof_probe_complete = sof_of_probe_complete;
|
||||
#endif
|
||||
/* call sof helper for DSP hardware probe */
|
||||
ret = snd_sof_device_probe(dev, sof_pdata);
|
||||
if (ret) {
|
||||
dev_err(dev, "error: failed to probe DSP hardware\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if !IS_ENABLED(CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE)
|
||||
sof_of_probe_complete(dev);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
/* call sof helper for DSP hardware probe */
|
||||
return snd_sof_device_probe(dev, sof_pdata);
|
||||
}
|
||||
|
||||
static int sof_of_remove(struct platform_device *pdev)
|
||||
|
||||
Reference in New Issue
Block a user