summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-09-09 21:08:31 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2015-09-14 21:52:16 -0700
commitc9733b78ca4734a10e1c9b7a23b44fc1736d9daa (patch)
treee4b722c70091f01428dd88fe1df06ce852455b47 /drivers
parent8bcc2d80dd6aaed009bd0212cf844ef39131547a (diff)
greybus: firmware: Fix incorrect firmware file's name
All the id-fields are 32 bit long instead of 16 bits and so we will need 8 characters per field instead of four. Also the stage field is only one byte long and so needs just two characters to represent it. Reported-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/greybus/firmware.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/greybus/firmware.c b/drivers/staging/greybus/firmware.c
index fbc6048644a0..b8f33e7bce55 100644
--- a/drivers/staging/greybus/firmware.c
+++ b/drivers/staging/greybus/firmware.c
@@ -27,7 +27,7 @@ static int download_firmware(struct gb_firmware *firmware, u8 stage)
{
struct gb_connection *connection = firmware->connection;
struct gb_interface *intf = connection->bundle->intf;
- char firmware_name[32];
+ char firmware_name[46];
/* Already have a firmware, free it */
if (firmware->fw)
@@ -39,7 +39,7 @@ static int download_firmware(struct gb_firmware *firmware, u8 stage)
* XXX Name it properly..
*/
snprintf(firmware_name, sizeof(firmware_name),
- "ara:%04x:%04x:%04x:%04x:%04x.fw",
+ "ara:%08x:%08x:%08x:%08x:%02x.fw",
intf->unipro_mfg_id, intf->unipro_prod_id,
intf->ara_vend_id, intf->ara_prod_id, stage);