diff options
| author | Ajay Agarwal <ajaya@codeaurora.org> | 2018-12-27 16:48:44 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-01-10 21:03:34 -0800 |
| commit | e5f5ba3002130f2ee9bd0979437d8fad979e241e (patch) | |
| tree | 2e623e6552325a4fc37f6382e6e702ae8558848b | |
| parent | fda16fc18334dd2efa39262cefbee2e3a4cd1897 (diff) | |
usb: gadget: f_hid: Add support for HID function
Add support for the HID function with the configfs framework.
Change-Id: I4da589aa453f892bf26cf16ce1a80426100ac02d
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
| -rw-r--r-- | drivers/usb/gadget/function/f_hid.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c index 3ce3d5504b67..fef3c11d84c3 100644 --- a/drivers/usb/gadget/function/f_hid.c +++ b/drivers/usb/gadget/function/f_hid.c @@ -1134,6 +1134,20 @@ static struct usb_function *hidg_alloc(struct usb_function_instance *fi) } DECLARE_USB_FUNCTION_INIT(hid, hidg_alloc_inst, hidg_alloc); + +static int __init afunc_init(void) +{ + return usb_function_register(&hidusb_func); +} + +static void __exit afunc_exit(void) +{ + usb_function_unregister(&hidusb_func); +} + +module_init(afunc_init); +module_exit(afunc_exit); + MODULE_LICENSE("GPL"); MODULE_AUTHOR("Fabien Chouteau"); |
