usb: configfs: synchronize the secure and udc_name state
authorYonghua Yan <yanyh2@motorola.com>
Thu, 27 Dec 2018 03:48:34 +0000 (11:48 +0800)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:59 +0000 (20:23 +0300)
commit327b8bda31d3a08981627b8fc09fd0ef8f64a9dd
tree2e978c8c7777a918a8ca7c0d8926c1c01344c49e
parentc9c2c0f6333ae63dd260e640a293ed22ab2843ae
usb: configfs: synchronize the secure and udc_name state

The gadget driver unregister/probe is not allowed to reentry
for the same udc.

As the conditions for gadget driver unregister/probe entry,
gadget secure and udc_name status should be synchronized.
Otherwise, in old implement code logic, there is still a chance
to fall into trouble of gadget driver unregister/probe reentry
for the same udc.

Change-Id: I6eb30a36eab84afd656f5bee9678e8d44933c6bc
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1287442
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1376191
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
drivers/usb/gadget/configfs.c