Fixed a possibility that the function handler might be called twice 80/228080/3
authorINSUN PYO <insun.pyo@samsung.com>
Thu, 19 Mar 2020 02:43:30 +0000 (11:43 +0900)
committerINSUN PYO <insun.pyo@samsung.com>
Thu, 19 Mar 2020 03:55:46 +0000 (03:55 +0000)
commit7803a3c5a1b0293a5bda490c26c95ae8b967e001
treec17d758d364f106093ef7d59f4f81c1ceeee5d62
parent52e9dce09444267176cc1aade368944aadf8cc58
Fixed a possibility that the function handler might be called twice

Configfs can use more than one configs.
(/sys/kernel/config/usb_gadget/hal-gadget/configs/hal-config.1 and /sys/kernel/config/usb_gadget/hal-gadget/configs/hal-config.2)

One usb function can be included in two config simultaneously.
In this situation, a handler associated with function can be called twice for a usb function.

To prevent duplicate calls,
it handles only the handlers of functions enabled in configfs, not the usb functions included in all configs.

Change-Id: I5e02dadc5d2688f0ad9210ad5ab149fb95ab05ba
hw/usb_cfs_client_common.c