diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2022-04-14 13:48:11 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-04-19 12:03:40 +0100 |
commit | 37e809d5f8a7bfbf0abbd4666d0b8ad499f12b7f (patch) | |
tree | 9b769001929dfc594b3f0c969589586cf6b5d782 /sound/soc/sof/core.c | |
parent | 856601e5a7ebe69b1c07adef7be80f9a03884329 (diff) |
ASoC: SOF: Intel: hda: use common ops across platforms
The dsp_ops are mostly common between platforms. Introduce a common
structure and an init function to set platform-specific values.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220414184817.362215-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/core.c')
-rw-r--r-- | sound/soc/sof/core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c index 27a98867f999..d981a1c3fb05 100644 --- a/sound/soc/sof/core.c +++ b/sound/soc/sof/core.c @@ -342,6 +342,7 @@ static void sof_probe_work(struct work_struct *work) int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data) { struct snd_sof_dev *sdev; + int ret; sdev = devm_kzalloc(dev, sizeof(*sdev), GFP_KERNEL); if (!sdev) @@ -358,7 +359,9 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data) dev_set_drvdata(dev, sdev); /* init ops, if necessary */ - sof_ops_init(sdev); + ret = sof_ops_init(sdev); + if (ret < 0) + return ret; /* check all mandatory ops */ if (!sof_ops(sdev) || !sof_ops(sdev)->probe || !sof_ops(sdev)->run || |