summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2018-11-21 12:24:18 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-11-29 10:49:49 +0100
commit9be20e200ae372abf9fcce92b737bda94a79c56f (patch)
tree07884e86aed30b1fd4ab27b808c3e4333cd5fbbd
parent61e5de057df1d5f2674d554680bd4b79b3276b76 (diff)
nvavp: avoid needless string copies
Signed-off-by: Rolf Eike Beer <eb@emlix.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--drivers/media/platform/tegra/nvavp/nvavp_dev.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/platform/tegra/nvavp/nvavp_dev.c b/drivers/media/platform/tegra/nvavp/nvavp_dev.c
index 25dee33ea9aa..52d5656ff54f 100644
--- a/drivers/media/platform/tegra/nvavp/nvavp_dev.c
+++ b/drivers/media/platform/tegra/nvavp/nvavp_dev.c
@@ -1003,18 +1003,17 @@ static int nvavp_load_ucode(struct nvavp_info *nvavp)
{
struct nvavp_ucode_info *ucode_info = &nvavp->ucode_info;
const struct firmware *nvavp_ucode_fw;
- char fw_ucode_file[32];
- void *ptr;
int ret = 0;
if (!ucode_info->ucode_bin) {
- sprintf(fw_ucode_file, "nvavp_vid_ucode.bin");
+ const char *fw_ucode_file = "nvavp_vid_ucode.bin";
+ void *ptr;
ret = request_firmware(&nvavp_ucode_fw, fw_ucode_file,
nvavp->video_misc_dev.this_device);
if (ret) {
/* Try alternative version */
- sprintf(fw_ucode_file, "nvavp_vid_ucode_alt.bin");
+ fw_ucode_file = "nvavp_vid_ucode_alt.bin";
ret = request_firmware(&nvavp_ucode_fw,
fw_ucode_file,