summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/sof-acpi-dev.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>2021-05-21 12:27:58 +0300
committerMark Brown <broonie@kernel.org>2021-05-21 13:13:35 +0100
commitfd979ec12eebcfb718f2c7c28b336d891d439f85 (patch)
treec01c8c660355e62c45adc61d8769644d558d6289 /sound/soc/sof/sof-acpi-dev.c
parentaa736700f42fa0813e286ca2f9274ffaa25163b9 (diff)
downloadlinux-stable-fd979ec12eebcfb718f2c7c28b336d891d439f85.tar.gz
linux-stable-fd979ec12eebcfb718f2c7c28b336d891d439f85.tar.bz2
linux-stable-fd979ec12eebcfb718f2c7c28b336d891d439f85.zip
ASoC: SOF: Check desc->ops directly in acpi/pci/of probe functions
We can check for the desc->ops directly in the probe functions, the ops is not used directly in the functions. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20210521092804.3721324-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/sof-acpi-dev.c')
-rw-r--r--sound/soc/sof/sof-acpi-dev.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/soc/sof/sof-acpi-dev.c b/sound/soc/sof/sof-acpi-dev.c
index 7fbf09f9f17e..74982c04497b 100644
--- a/sound/soc/sof/sof-acpi-dev.c
+++ b/sound/soc/sof/sof-acpi-dev.c
@@ -60,7 +60,6 @@ int sof_acpi_probe(struct platform_device *pdev, const struct sof_dev_desc *desc
{
struct device *dev = &pdev->dev;
struct snd_sof_pdata *sof_pdata;
- const struct snd_sof_dsp_ops *ops;
dev_dbg(dev, "ACPI DSP detected");
@@ -68,9 +67,7 @@ int sof_acpi_probe(struct platform_device *pdev, const struct sof_dev_desc *desc
if (!sof_pdata)
return -ENOMEM;
- /* get ops for platform */
- ops = desc->ops;
- if (!ops) {
+ if (!desc->ops) {
dev_err(dev, "error: no matching ACPI descriptor ops\n");
return -ENODEV;
}