usb: configfs: Reset the use_os_desc flag
os_desc support can be turned off via userspace. Kernel also needs to correspondingly reset its state if userspace has changed it. Otherwise this cause os descs to be advertised on drivers that have no os desc support. Change-Id: Ib8da2eb78a1640aac9abdb29840a33773603d1a8 Signed-off-by: Ravi Vembu <raviv@motorola.com> Moto-CRs-fixed: (CR) Reviewed-on: https://gerrit.mot.com/920122 SLTApproved: Slta Waiver <sltawvr@motorola.com> SME-Granted: SME Approvals Granted Tested-by: Jira Key <jirakey@motorola.com> Reviewed-by: Christopher Fries <cfries@motorola.com> Submit-Approved: Jira Key <jirakey@motorola.com> Reviewed-on: https://gerrit.mot.com/1167316 SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Lu Chai <chailu1@motorola.com> Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key Reviewed-on: https://gerrit.mot.com/1257205 Reviewed-by: Xiaojun Ji <jixj@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Reviewed-on: https://gerrit.mot.com/1338832 Reviewed-on: https://gerrit.mot.com/1449034 Reviewed-on: https://gerrit.mot.com/1511634 Reviewed-by: Zonghua Liu <a17671@motorola.com> Reviewed-by: Wang Wang <wangwang1@lenovo.com>
This commit is contained in:
1 parent
4763aedad8
commit
23e5982bf2
1 file changed
+2
-1
@@ -1358,7 +1358,8 @@ static int configfs_composite_bind(struct usb_gadget *gadget,
|
||||
cdev->use_os_string = true;
|
||||
cdev->b_vendor_code = gi->b_vendor_code;
|
||||
memcpy(cdev->qw_sign, gi->qw_sign, OS_STRING_QW_SIGN_LEN);
|
||||
}
|
||||
} else
|
||||
cdev->use_os_string = false;
|
||||
|
||||
if (gadget_is_otg(gadget) && !otg_desc[0]) {
|
||||
struct usb_descriptor_header *usb_desc;
|
||||
|
||||
Reference in new issue
Block a user