diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2013-05-23 09:22:10 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-06-10 16:15:02 +0200 |
commit | e730660378be92b83288b59b824ccdace5cd2652 (patch) | |
tree | 043b481d28fef791313785a53399bb91e7a72b14 /drivers/usb/gadget/u_ncm.h | |
parent | usb: gadget: f_ncm: use usb_gstrings_attach (diff) | |
download | linux-e730660378be92b83288b59b824ccdace5cd2652.tar.xz linux-e730660378be92b83288b59b824ccdace5cd2652.zip |
usb: gadget: f_ncm: add configfs support
Add configfs support to the NCM function driver so
that we can, eventually, get rid of kernel-based
gadget drivers.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/u_ncm.h')
-rw-r--r-- | drivers/usb/gadget/u_ncm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/gadget/u_ncm.h b/drivers/usb/gadget/u_ncm.h index 1e22b5fa844b..ce0f3a78ca13 100644 --- a/drivers/usb/gadget/u_ncm.h +++ b/drivers/usb/gadget/u_ncm.h @@ -22,6 +22,15 @@ struct f_ncm_opts { struct usb_function_instance func_inst; struct net_device *net; bool bound; + + /* + * Read/write access to configfs attributes is handled by configfs. + * + * This is to protect the data from concurrent access by read/write + * and create symlink/remove symlink. + */ + struct mutex lock; + int refcnt; }; #endif /* U_NCM_H */ |