Skip to content

Commit 57f531d

Browse files
Kuen-Han Tsaigregkh
authored andcommitted
usb: gadget: u_ncm: Add kernel-doc comments for struct f_ncm_opts
Provide kernel-doc descriptions for the fields in struct f_ncm_opts to improve code readability and maintainability. Signed-off-by: Kuen-Han Tsai <khtsai@google.com> Link: https://patch.msgid.link/20260320-usb-net-lifecycle-v1-3-4886b578161b@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8d8c68b commit 57f531d

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

drivers/usb/gadget/function/u_ncm.h

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@
1515

1616
#include <linux/usb/composite.h>
1717

18+
/**
19+
* struct f_ncm_opts - NCM function options
20+
* @func_inst: USB function instance.
21+
* @net: The net_device associated with the NCM function.
22+
* @bind_count: Tracks the number of configurations the NCM function is
23+
* bound to, preventing double-registration of the @net device.
24+
* @ncm_interf_group: ConfigFS group for NCM interface.
25+
* @ncm_os_desc: USB OS descriptor for NCM.
26+
* @ncm_ext_compat_id: Extended compatibility ID.
27+
* @lock: Protects the data from concurrent access by configfs read/write
28+
* and create symlink/remove symlink operations.
29+
* @refcnt: Reference counter for the function instance.
30+
* @max_segment_size: Maximum segment size.
31+
*/
1832
struct f_ncm_opts {
1933
struct usb_function_instance func_inst;
2034
struct net_device *net;
@@ -23,12 +37,7 @@ struct f_ncm_opts {
2337
struct config_group *ncm_interf_group;
2438
struct usb_os_desc ncm_os_desc;
2539
char ncm_ext_compat_id[16];
26-
/*
27-
* Read/write access to configfs attributes is handled by configfs.
28-
*
29-
* This is to protect the data from concurrent access by read/write
30-
* and create symlink/remove symlink.
31-
*/
40+
3241
struct mutex lock;
3342
int refcnt;
3443

0 commit comments

Comments
 (0)