diff mbox series

[2/7] ASoC: SOF: pci: No need to cast second time to save the desc

Message ID 20210521092804.3721324-3-kai.vehmanen@linux.intel.com
State New
Headers show
Series ASoC: SOF: code cleanups for 5.14 | expand

Commit Message

Kai Vehmanen May 21, 2021, 9:27 a.m. UTC
From: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>

At the start of the function we already have the desc, no need to cast it
again from pci_id->driver_data to save it to sof_pdata.

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>
---
 sound/soc/sof/sof-pci-dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c
index a1db973d5673..03119462f9e2 100644
--- a/sound/soc/sof/sof-pci-dev.c
+++ b/sound/soc/sof/sof-pci-dev.c
@@ -138,7 +138,7 @@  int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
 		return ret;
 
 	sof_pdata->name = pci_name(pci);
-	sof_pdata->desc = (struct sof_dev_desc *)pci_id->driver_data;
+	sof_pdata->desc = desc;
 	sof_pdata->dev = dev;
 	sof_pdata->fw_filename = desc->default_fw_filename;