#include <linux/slab.h>
#include <linux/device.h>
#include <linux/devfreq.h>
#include <linux/pm.h>
#include <linux/mutex.h>
#include <linux/module.h>
#include "governor.h"
struct userspace_data { … };
static int devfreq_userspace_func(struct devfreq *df, unsigned long *freq)
{ … }
static ssize_t set_freq_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{ … }
static ssize_t set_freq_show(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static DEVICE_ATTR_RW(set_freq);
static struct attribute *dev_entries[] = …;
static const struct attribute_group dev_attr_group = …;
static int userspace_init(struct devfreq *devfreq)
{ … }
static void userspace_exit(struct devfreq *devfreq)
{ … }
static int devfreq_userspace_handler(struct devfreq *devfreq,
unsigned int event, void *data)
{ … }
static struct devfreq_governor devfreq_userspace = …;
static int __init devfreq_userspace_init(void)
{ … }
subsys_initcall(devfreq_userspace_init);
static void __exit devfreq_userspace_exit(void)
{ … }
module_exit(devfreq_userspace_exit);
MODULE_LICENSE(…) …;