#include <linux/kobject.h>
#include <linux/string.h>
#include <linux/sysfs.h>
#include <linux/module.h>
#include <linux/init.h>
static int foo;
static int baz;
static int bar;
static ssize_t foo_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static ssize_t foo_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute foo_attribute = …;
static ssize_t b_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{ … }
static ssize_t b_store(struct kobject *kobj, struct kobj_attribute *attr,
const char *buf, size_t count)
{ … }
static struct kobj_attribute baz_attribute = …;
static struct kobj_attribute bar_attribute = …;
static struct attribute *attrs[] = …;
static struct attribute_group attr_group = …;
static struct kobject *example_kobj;
static int __init example_init(void)
{ … }
static void __exit example_exit(void)
{ … }
module_init(…) …;
module_exit(example_exit);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;