提交 092a4bd0 编写于 作者: A Andrzej Pietrasiewicz 提交者: Felipe Balbi

usb: gadget: configfs: add a method to unregister the gadget

Add a method to unregister the gadget using its config_item.

There can be functions (e.g. mass storage), which in some circumstances
need the gadget stopped. Add a method of stopping the gadget.
Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 a3469411
...@@ -991,6 +991,14 @@ static struct configfs_subsystem gadget_subsys = { ...@@ -991,6 +991,14 @@ static struct configfs_subsystem gadget_subsys = {
.su_mutex = __MUTEX_INITIALIZER(gadget_subsys.su_mutex), .su_mutex = __MUTEX_INITIALIZER(gadget_subsys.su_mutex),
}; };
void unregister_gadget_item(struct config_item *item)
{
struct gadget_info *gi = to_gadget_info(item);
unregister_gadget(gi);
}
EXPORT_SYMBOL(unregister_gadget_item);
static int __init gadget_cfs_init(void) static int __init gadget_cfs_init(void)
{ {
int ret; int ret;
......
#ifndef USB__GADGET__CONFIGFS__H
#define USB__GADGET__CONFIGFS__H
void unregister_gadget_item(struct config_item *item);
#endif /* USB__GADGET__CONFIGFS__H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册