aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/fw-download.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2016-07-20 10:11:37 -0700
committerGreg Kroah-Hartman <gregkh@google.com>2016-07-20 10:29:07 -0700
commit8a704565ebda9603c294aacebb34e47cd9d9a3a0 (patch)
tree291aa9908458a9e3fbbe29687b59778e8a57b82e /drivers/staging/greybus/fw-download.c
parentgreybus: interface: hibernate UniPro link in activation error path (diff)
downloadlinux-dev-8a704565ebda9603c294aacebb34e47cd9d9a3a0.tar.xz
linux-dev-8a704565ebda9603c294aacebb34e47cd9d9a3a0.zip
greybus: move all firmware prefix strings to one place
The firmware prefix is hard-coded in a few different places. Put it all in one handy #define, for when/if we ever decide to change it in the future... Testing: 'strings gb-firmware.ko gb-bootrom.ko | grep ara_' produced the same output before and after this patch. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Sandeep Patil <sspatil@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/fw-download.c')
-rw-r--r--drivers/staging/greybus/fw-download.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/greybus/fw-download.c b/drivers/staging/greybus/fw-download.c
index 42cbbf4ac077..41a45ecb62b6 100644
--- a/drivers/staging/greybus/fw-download.c
+++ b/drivers/staging/greybus/fw-download.c
@@ -14,8 +14,6 @@
#include "firmware.h"
#include "greybus.h"
-/* Length of the string in format: ara_%08x_%08x_%08x_%08x_%s.tftf */
-#define FW_NAME_LEN 56
/* Estimated minimum buffer size, actual size can be smaller than this */
#define MIN_FETCH_SIZE 512
/* Timeout, in jiffies, within which fetch or release firmware must be called */
@@ -182,7 +180,7 @@ static struct fw_request *find_firmware(struct fw_download *fw_download,
fw_req->firmware_id = ret;
snprintf(fw_req->name, sizeof(fw_req->name),
- "ara_%08x_%08x_%08x_%08x_%s.tftf",
+ FW_NAME_PREFIX "%08x_%08x_%08x_%08x_%s.tftf",
intf->ddbl1_manufacturer_id, intf->ddbl1_product_id,
intf->vendor_id, intf->product_id, tag);