From: Peter Ujfalusi Date: Thu, 20 Oct 2022 12:12:25 +0000 (+0300) Subject: ASoC: SOF: Drop the firmware and fw_offset from snd_sof_pdata X-Git-Tag: v6.6.17~5842^2^2~164^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3775fda57d49984eaa2cfd86665a152806bfd81;p=platform%2Fkernel%2Flinux-rpi.git ASoC: SOF: Drop the firmware and fw_offset from snd_sof_pdata The SOF stack now uses the sdev->basefw to work with the SOF firmware, the information from plat_data can be dropped. Signed-off-by: Peter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Chao Song Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20221020121238.18339-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/include/sound/sof.h b/include/sound/sof.h index 341fef1..e1f2f02 100644 --- a/include/sound/sof.h +++ b/include/sound/sof.h @@ -59,15 +59,11 @@ enum sof_ipc_type { * SOF Platform data. */ struct snd_sof_pdata { - const struct firmware *fw; const char *name; const char *platform; struct device *dev; - /* indicate how many first bytes shouldn't be loaded into DSP memory. */ - size_t fw_offset; - /* * notification callback used if the hardware initialization * can take time or is handled in a workqueue. This callback diff --git a/sound/soc/sof/loader.c b/sound/soc/sof/loader.c index 1e31b7c..723bd82 100644 --- a/sound/soc/sof/loader.c +++ b/sound/soc/sof/loader.c @@ -58,12 +58,6 @@ int snd_sof_load_firmware_raw(struct snd_sof_dev *sdev) fw_filename, ret); } - /* - * Until the platform code is switched to use the new container the fw - * and payload offset must be set in plat_data - */ - plat_data->fw = sdev->basefw.fw; - plat_data->fw_offset = sdev->basefw.payload_offset; err: kfree(fw_filename); @@ -73,7 +67,6 @@ EXPORT_SYMBOL(snd_sof_load_firmware_raw); int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev) { - struct snd_sof_pdata *plat_data = sdev->pdata; int ret; ret = snd_sof_load_firmware_raw(sdev); @@ -108,7 +101,6 @@ int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev) error: release_firmware(sdev->basefw.fw); sdev->basefw.fw = NULL; - plat_data->fw = NULL; return ret; } @@ -194,6 +186,5 @@ void snd_sof_fw_unload(struct snd_sof_dev *sdev) /* TODO: support module unloading at runtime */ release_firmware(sdev->basefw.fw); sdev->basefw.fw = NULL; - sdev->pdata->fw = NULL; } EXPORT_SYMBOL(snd_sof_fw_unload);