#ifndef _CONFIGFS_H_
#define _CONFIGFS_H_
#include <linux/stat.h>
#include <linux/types.h>
#include <linux/list.h>
#include <linux/kref.h>
#include <linux/mutex.h>
#define CONFIGFS_ITEM_NAME_LEN …
struct module;
struct configfs_item_operations;
struct configfs_group_operations;
struct configfs_attribute;
struct configfs_bin_attribute;
struct configfs_subsystem;
struct config_item { … };
extern __printf(2, 3)
int config_item_set_name(struct config_item *, const char *, ...);
static inline char *config_item_name(struct config_item * item)
{ … }
extern void config_item_init_type_name(struct config_item *item,
const char *name,
const struct config_item_type *type);
extern struct config_item *config_item_get(struct config_item *);
extern struct config_item *config_item_get_unless_zero(struct config_item *);
extern void config_item_put(struct config_item *);
struct config_item_type { … };
struct config_group { … };
extern void config_group_init(struct config_group *group);
extern void config_group_init_type_name(struct config_group *group,
const char *name,
const struct config_item_type *type);
static inline struct config_group *to_config_group(struct config_item *item)
{ … }
static inline struct config_group *config_group_get(struct config_group *group)
{ … }
static inline void config_group_put(struct config_group *group)
{ … }
extern struct config_item *config_group_find_item(struct config_group *,
const char *);
static inline void configfs_add_default_group(struct config_group *new_group,
struct config_group *group)
{ … }
struct configfs_attribute { … };
#define CONFIGFS_ATTR(_pfx, _name) …
#define CONFIGFS_ATTR_RO(_pfx, _name) …
#define CONFIGFS_ATTR_WO(_pfx, _name) …
struct file;
struct vm_area_struct;
struct configfs_bin_attribute { … };
#define CONFIGFS_BIN_ATTR(_pfx, _name, _priv, _maxsz) …
#define CONFIGFS_BIN_ATTR_RO(_pfx, _name, _priv, _maxsz) …
#define CONFIGFS_BIN_ATTR_WO(_pfx, _name, _priv, _maxsz) …
struct configfs_item_operations { … };
struct configfs_group_operations { … };
struct configfs_subsystem { … };
static inline struct configfs_subsystem *to_configfs_subsystem(struct config_group *group)
{ … }
int configfs_register_subsystem(struct configfs_subsystem *subsys);
void configfs_unregister_subsystem(struct configfs_subsystem *subsys);
int configfs_register_group(struct config_group *parent_group,
struct config_group *group);
void configfs_unregister_group(struct config_group *group);
void configfs_remove_default_groups(struct config_group *group);
struct config_group *
configfs_register_default_group(struct config_group *parent_group,
const char *name,
const struct config_item_type *item_type);
void configfs_unregister_default_group(struct config_group *group);
int configfs_depend_item(struct configfs_subsystem *subsys,
struct config_item *target);
void configfs_undepend_item(struct config_item *target);
int configfs_depend_item_unlocked(struct configfs_subsystem *caller_subsys,
struct config_item *target);
static inline void configfs_undepend_item_unlocked(struct config_item *target)
{ … }
#endif