#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/configfs.h>
struct childless { … };
static inline struct childless *to_childless(struct config_item *item)
{ … }
static ssize_t childless_showme_show(struct config_item *item, char *page)
{ … }
static ssize_t childless_storeme_show(struct config_item *item, char *page)
{ … }
static ssize_t childless_storeme_store(struct config_item *item,
const char *page, size_t count)
{ … }
static ssize_t childless_description_show(struct config_item *item, char *page)
{ … }
CONFIGFS_ATTR_RO(…);
CONFIGFS_ATTR(…);
CONFIGFS_ATTR_RO(…);
static struct configfs_attribute *childless_attrs[] = …;
static const struct config_item_type childless_type = …;
static struct childless childless_subsys = …;
struct simple_child { … };
static inline struct simple_child *to_simple_child(struct config_item *item)
{ … }
static ssize_t simple_child_storeme_show(struct config_item *item, char *page)
{ … }
static ssize_t simple_child_storeme_store(struct config_item *item,
const char *page, size_t count)
{ … }
CONFIGFS_ATTR(…);
static struct configfs_attribute *simple_child_attrs[] = …;
static void simple_child_release(struct config_item *item)
{ … }
static struct configfs_item_operations simple_child_item_ops = …;
static const struct config_item_type simple_child_type = …;
struct simple_children { … };
static inline struct simple_children *to_simple_children(struct config_item *item)
{ … }
static struct config_item *simple_children_make_item(struct config_group *group,
const char *name)
{ … }
static ssize_t simple_children_description_show(struct config_item *item,
char *page)
{ … }
CONFIGFS_ATTR_RO(…);
static struct configfs_attribute *simple_children_attrs[] = …;
static void simple_children_release(struct config_item *item)
{ … }
static struct configfs_item_operations simple_children_item_ops = …;
static struct configfs_group_operations simple_children_group_ops = …;
static const struct config_item_type simple_children_type = …;
static struct configfs_subsystem simple_children_subsys = …;
static struct config_group *group_children_make_group(
struct config_group *group, const char *name)
{ … }
static ssize_t group_children_description_show(struct config_item *item,
char *page)
{ … }
CONFIGFS_ATTR_RO(…);
static struct configfs_attribute *group_children_attrs[] = …;
static struct configfs_group_operations group_children_group_ops = …;
static const struct config_item_type group_children_type = …;
static struct configfs_subsystem group_children_subsys = …;
static struct configfs_subsystem *example_subsys[] = …;
static int __init configfs_example_init(void)
{ … }
static void __exit configfs_example_exit(void)
{ … }
module_init(configfs_example_init);
module_exit(configfs_example_exit);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;