diff options
author | Vinod Koul <vinod.koul@intel.com> | 2010-11-22 10:33:40 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-29 19:13:55 (GMT) |
commit | 79a35ad57300f78c7250eeeca57b602e06ff402a (patch) | |
tree | 033e226396b511453b0fd8adbbb3573119423404 /drivers/staging/intel_sst/intel_sst_drv_interface.c | |
parent | 964c6975e8a4314c451d420f1cb54880ab535433 (diff) | |
download | linux-79a35ad57300f78c7250eeeca57b602e06ff402a.tar.xz |
Staging: sst: Construct fw string name runtime
The firmware name for each platform is appended by PCI id of device.
This patch makes use of pci id to construct the string rather than
hardcode the string.
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/intel_sst/intel_sst_drv_interface.c')
-rw-r--r-- | drivers/staging/intel_sst/intel_sst_drv_interface.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/staging/intel_sst/intel_sst_drv_interface.c b/drivers/staging/intel_sst/intel_sst_drv_interface.c index f91c914..ea8e251 100644 --- a/drivers/staging/intel_sst/intel_sst_drv_interface.c +++ b/drivers/staging/intel_sst/intel_sst_drv_interface.c @@ -48,13 +48,14 @@ int sst_download_fw(void) { int retval; const struct firmware *fw_sst; - const char *name; + char name[20]; + if (sst_drv_ctx->sst_state != SST_UN_INIT) return -EPERM; - if (sst_drv_ctx->pci_id == SST_MRST_PCI_ID) - name = SST_FW_FILENAME_MRST; - else - name = SST_FW_FILENAME_MFLD; + + snprintf(name, sizeof(name), "%s%04x%s", "fw_sst_", + sst_drv_ctx->pci_id, ".bin"); + pr_debug("Downloading %s FW now...\n", name); retval = request_firmware(&fw_sst, name, &sst_drv_ctx->pci->dev); if (retval) { |