diff options
author | Andrzej Pietrasiewicz <andrzej.p@samsung.com> | 2013-05-28 09:16:01 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-06-10 17:58:10 +0300 |
commit | b3df2faacb40da7d9c4ed1a0b5304cf346e46ca0 (patch) | |
tree | 5a5eafd9044afc02b13a5f3546ebbd505cd44f9a /drivers/usb/gadget/u_rndis.h | |
parent | 4e75e7275652824395696ba1e34c10d368958caf (diff) | |
download | linux-b3df2faacb40da7d9c4ed1a0b5304cf346e46ca0.tar.bz2 |
usb: gadget: f_rndis: add configfs support
f_rndis learns about configfs so we can, eventually,
remove in-kernel 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_rndis.h')
-rw-r--r-- | drivers/usb/gadget/u_rndis.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/usb/gadget/u_rndis.h b/drivers/usb/gadget/u_rndis.h index d274df56ce75..c62ba82e9600 100644 --- a/drivers/usb/gadget/u_rndis.h +++ b/drivers/usb/gadget/u_rndis.h @@ -25,6 +25,15 @@ struct f_rndis_opts { struct net_device *net; bool bound; bool borrowed_net; + + /* + * 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; }; void rndis_borrow_net(struct usb_function_instance *f, struct net_device *net); |