diff options
Diffstat (limited to 'drivers/usb/emul/sandbox_flash.c')
-rw-r--r-- | drivers/usb/emul/sandbox_flash.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/emul/sandbox_flash.c b/drivers/usb/emul/sandbox_flash.c index 3a9db835ee..eaa7f1e7ff 100644 --- a/drivers/usb/emul/sandbox_flash.c +++ b/drivers/usb/emul/sandbox_flash.c @@ -245,12 +245,8 @@ static int handle_ufi_command(struct sandbox_flash_plat *plat, memset(resp, '\0', sizeof(*resp)); resp->data_format = 1; resp->additional_len = 0x1f; - strncpy(resp->vendor, - plat->flash_strings[STRINGID_MANUFACTURER - 1].s, - sizeof(resp->vendor)); - strncpy(resp->product, - plat->flash_strings[STRINGID_PRODUCT - 1].s, - sizeof(resp->product)); + strncpy(resp->vendor, info->vendor, sizeof(resp->vendor)); + strncpy(resp->product, info->product, sizeof(resp->product)); strncpy(resp->revision, "1.0", sizeof(resp->revision)); setup_response(priv, resp, sizeof(*resp)); break; @@ -406,6 +402,8 @@ static int sandbox_flash_probe(struct udevice *dev) info->buff = malloc(SANDBOX_FLASH_BUF_SIZE); if (!info->buff) return log_ret(-ENOMEM); + info->vendor = plat->flash_strings[STRINGID_MANUFACTURER - 1].s; + info->product = plat->flash_strings[STRINGID_PRODUCT - 1].s; return 0; } |