#include <linux/sysfs.h>
#include <linux/ctype.h>
#include <linux/slab.h>
#include <linux/mdev.h>
#include "mdev_private.h"
struct mdev_type_attribute { … };
#define MDEV_TYPE_ATTR_RO(_name) …
#define MDEV_TYPE_ATTR_WO(_name) …
static ssize_t mdev_type_attr_show(struct kobject *kobj,
struct attribute *__attr, char *buf)
{ … }
static ssize_t mdev_type_attr_store(struct kobject *kobj,
struct attribute *__attr,
const char *buf, size_t count)
{ … }
static const struct sysfs_ops mdev_type_sysfs_ops = …;
static ssize_t create_store(struct mdev_type *mtype,
struct mdev_type_attribute *attr, const char *buf,
size_t count)
{ … }
static MDEV_TYPE_ATTR_WO(create);
static ssize_t device_api_show(struct mdev_type *mtype,
struct mdev_type_attribute *attr, char *buf)
{ … }
static MDEV_TYPE_ATTR_RO(device_api);
static ssize_t name_show(struct mdev_type *mtype,
struct mdev_type_attribute *attr, char *buf)
{ … }
static MDEV_TYPE_ATTR_RO(name);
static ssize_t available_instances_show(struct mdev_type *mtype,
struct mdev_type_attribute *attr,
char *buf)
{ … }
static MDEV_TYPE_ATTR_RO(available_instances);
static ssize_t description_show(struct mdev_type *mtype,
struct mdev_type_attribute *attr,
char *buf)
{ … }
static MDEV_TYPE_ATTR_RO(description);
static struct attribute *mdev_types_core_attrs[] = …;
static umode_t mdev_types_core_is_visible(struct kobject *kobj,
struct attribute *attr, int n)
{ … }
static struct attribute_group mdev_type_core_group = …;
static const struct attribute_group *mdev_type_groups[] = …;
static void mdev_type_release(struct kobject *kobj)
{ … }
static const struct kobj_type mdev_type_ktype = …;
static int mdev_type_add(struct mdev_parent *parent, struct mdev_type *type)
{ … }
static void mdev_type_remove(struct mdev_type *type)
{ … }
void parent_remove_sysfs_files(struct mdev_parent *parent)
{ … }
int parent_create_sysfs_files(struct mdev_parent *parent)
{ … }
static ssize_t remove_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static DEVICE_ATTR_WO(remove);
static struct attribute *mdev_device_attrs[] = …;
static const struct attribute_group mdev_device_group = …;
const struct attribute_group *mdev_device_groups[] = …;
int mdev_create_sysfs_files(struct mdev_device *mdev)
{ … }
void mdev_remove_sysfs_files(struct mdev_device *mdev)
{ … }