summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/config.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-05 05:43:07 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-05 05:43:07 +0300
commit3d0712deb0a416021e55febc7ec7f6c24f460e06 (patch)
treecf56aba54ac85516fc753b662a1880e8a50ee5d9 /drivers/usb/gadget/config.c
parent83253b3b0286ab6111e0266da74fb10b7b92746b (diff)
parent0561f77e2db9e72dc32e4f82b56fca8ba6b31171 (diff)
downloadlinux-3d0712deb0a416021e55febc7ec7f6c24f460e06.tar.xz
Merge tag 'usb-for-v4.6' of http://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
Felipe writes: usb changes for v4.6 merge window This is almost all under drivers/usb/dwc2/. Many changes to the host side implementation of dwc2 have been done by Douglas Anderson. We also have USB 3.1 support added to the Gadget Framework and, because of that work, dwc3 got support to Synopsys new DWC_usb31 IP core. Other than these 2 important series, we also have the usual collection of non-critical fixes, Documentation updates, and minor changes all over the place.
Diffstat (limited to 'drivers/usb/gadget/config.c')
-rw-r--r--drivers/usb/gadget/config.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/usb/gadget/config.c b/drivers/usb/gadget/config.c
index 0fafa7a1b6f6..e6c0542a063b 100644
--- a/drivers/usb/gadget/config.c
+++ b/drivers/usb/gadget/config.c
@@ -163,7 +163,8 @@ EXPORT_SYMBOL_GPL(usb_copy_descriptors);
int usb_assign_descriptors(struct usb_function *f,
struct usb_descriptor_header **fs,
struct usb_descriptor_header **hs,
- struct usb_descriptor_header **ss)
+ struct usb_descriptor_header **ss,
+ struct usb_descriptor_header **ssp)
{
struct usb_gadget *g = f->config->cdev->gadget;
@@ -182,6 +183,11 @@ int usb_assign_descriptors(struct usb_function *f,
if (!f->ss_descriptors)
goto err;
}
+ if (ssp && gadget_is_superspeed_plus(g)) {
+ f->ssp_descriptors = usb_copy_descriptors(ssp);
+ if (!f->ssp_descriptors)
+ goto err;
+ }
return 0;
err:
usb_free_all_descriptors(f);
@@ -194,6 +200,7 @@ void usb_free_all_descriptors(struct usb_function *f)
usb_free_descriptors(f->fs_descriptors);
usb_free_descriptors(f->hs_descriptors);
usb_free_descriptors(f->ss_descriptors);
+ usb_free_descriptors(f->ssp_descriptors);
}
EXPORT_SYMBOL_GPL(usb_free_all_descriptors);