diff options
author | Chris Dickens <christopher.a.dickens@gmail.com> | 2017-12-31 18:59:43 -0800 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-03-08 15:12:01 +0200 |
commit | 636ba13aec8a0198d3fa4e2246e291a19694b50f (patch) | |
tree | e1afdf90a059f69d77a1945cb99e1e2e02e805bb /fs/nls/mac-turkish.c | |
parent | 5d6ae4f0da8a64a185074dabb1b2f8c148efa741 (diff) | |
download | linux-636ba13aec8a0198d3fa4e2246e291a19694b50f.tar.gz linux-636ba13aec8a0198d3fa4e2246e291a19694b50f.tar.bz2 linux-636ba13aec8a0198d3fa4e2246e291a19694b50f.zip |
usb: gadget: composite: remove duplicated code in OS desc handling
When the host wants to fetch OS descriptors, it sends two requests. The
first is only for the header and the second for the full amount
specified by the header in the first request. The OS descriptor handling
code is distinguishing the header-only requests based on the wLength of
the setup packet, but the same code is executed in both cases to
construct the actual header. Simplify this by always constructing the
header and then filling out the rest of the request if the wLength is
greater than the size of the header.
Also remove the duplicate code for queueing the request to ep0 by adding
a goto label.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'fs/nls/mac-turkish.c')
0 files changed, 0 insertions, 0 deletions