batman-adv: Add kernel-doc to structs in headers
All structs in types.h are already documented. But some other headers still have private structs which also should be documented. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
This commit is contained in:
Родитель
a07369d7fb
Коммит
c93effcf72
|
@ -46,10 +46,18 @@ typedef bool (*batadv_hashdata_compare_cb)(const struct hlist_node *,
|
||||||
typedef u32 (*batadv_hashdata_choose_cb)(const void *, u32);
|
typedef u32 (*batadv_hashdata_choose_cb)(const void *, u32);
|
||||||
typedef void (*batadv_hashdata_free_cb)(struct hlist_node *, void *);
|
typedef void (*batadv_hashdata_free_cb)(struct hlist_node *, void *);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct batadv_hashtable - Wrapper of simple hlist based hashtable
|
||||||
|
*/
|
||||||
struct batadv_hashtable {
|
struct batadv_hashtable {
|
||||||
struct hlist_head *table; /* the hashtable itself with the buckets */
|
/** @table: the hashtable itself with the buckets */
|
||||||
spinlock_t *list_locks; /* spinlock for each hash list entry */
|
struct hlist_head *table;
|
||||||
u32 size; /* size of hashtable */
|
|
||||||
|
/** @list_locks: spinlock for each hash list entry */
|
||||||
|
spinlock_t *list_locks;
|
||||||
|
|
||||||
|
/** @size: size of hashtable */
|
||||||
|
u32 size;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* allocates and clears the hash */
|
/* allocates and clears the hash */
|
||||||
|
|
|
@ -36,10 +36,23 @@ struct net_device;
|
||||||
*/
|
*/
|
||||||
#define BATADV_SYSFS_VLAN_SUBDIR_PREFIX "vlan"
|
#define BATADV_SYSFS_VLAN_SUBDIR_PREFIX "vlan"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* struct batadv_attribute - sysfs export helper for batman-adv attributes
|
||||||
|
*/
|
||||||
struct batadv_attribute {
|
struct batadv_attribute {
|
||||||
|
/** @attr: sysfs attribute file */
|
||||||
struct attribute attr;
|
struct attribute attr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @show: function to export the current attribute's content to sysfs
|
||||||
|
*/
|
||||||
ssize_t (*show)(struct kobject *kobj, struct attribute *attr,
|
ssize_t (*show)(struct kobject *kobj, struct attribute *attr,
|
||||||
char *buf);
|
char *buf);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @store: function to load new value from character buffer and save it
|
||||||
|
* in batman-adv attribute
|
||||||
|
*/
|
||||||
ssize_t (*store)(struct kobject *kobj, struct attribute *attr,
|
ssize_t (*store)(struct kobject *kobj, struct attribute *attr,
|
||||||
char *buf, size_t count);
|
char *buf, size_t count);
|
||||||
};
|
};
|
||||||
|
|
Загрузка…
Ссылка в новой задаче