Skip to content
Snippets Groups Projects
Commit 9bf9e813 authored by Felipe Balbi's avatar Felipe Balbi Committed by Marek Vasut
Browse files

usb: gadget: f_dfu: set serial number if serial# is valid


With this patch, USB Command Verifier is happy with our DFU
implementation on Chapter 9 tests.

Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 949bf79e
No related branches found
No related tags found
No related merge requests found
......@@ -691,6 +691,7 @@ static int dfu_bind(struct usb_configuration *c, struct usb_function *f)
{
struct usb_composite_dev *cdev = c->cdev;
struct f_dfu *f_dfu = func_to_dfu(f);
const char *s;
int alt_num = dfu_get_alt_number();
int rv, id, i;
......@@ -724,6 +725,10 @@ static int dfu_bind(struct usb_configuration *c, struct usb_function *f)
cdev->req->context = f_dfu;
s = getenv("serial#");
if (s)
g_dnl_set_serialnumber((char *)s);
error:
return rv;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment