usb: gadget: Update functions for SSP descriptors

This change updates USB function drivers to assign SSP descriptors
using usb_assign_descriptors() API. USB SSP descriptors are needed
to enumerate these functions as different composite device in
super speed plus mode.

Change-Id: Iea4d623afb2bf572358d1cc1d0673f20f2d7d5aa
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
This commit is contained in:
Mayank Rana 2018-04-03 10:18:46 -07:00 • committed by Jack Pham
commit e501d1acc0
2 changed files with 3 additions and 1 deletions

View file

@ -3430,6 +3430,7 @@ static int _ffs_func_bind(struct usb_configuration *c,
ret = ss_len;
goto error;
}
func->function.ssp_descriptors = func->function.ss_descriptors;
} else {
ss_len = 0;
}
@ -3865,6 +3866,7 @@ static void ffs_func_unbind(struct usb_configuration *c,
func->function.fs_descriptors = NULL;
func->function.hs_descriptors = NULL;
func->function.ss_descriptors = NULL;
func->function.ssp_descriptors = NULL;
func->interfaces_nums = NULL;
ffs_event_add(ffs, FUNCTIONFS_UNBIND);

View file

@ -1519,7 +1519,7 @@ static int ncm_bind(struct usb_configuration *c, struct usb_function *f)
fs_ncm_notify_desc.bEndpointAddress;
status = usb_assign_descriptors(f, ncm_fs_function, ncm_hs_function,
ncm_ss_function, NULL);
ncm_ss_function, ncm_ss_function);
if (status)
goto fail;