#define pr_fmt(fmt) …
#include <linux/cpufreq.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/slab.h>
struct userspace_policy { … };
static int cpufreq_set(struct cpufreq_policy *policy, unsigned int freq)
{ … }
static ssize_t show_speed(struct cpufreq_policy *policy, char *buf)
{ … }
static int cpufreq_userspace_policy_init(struct cpufreq_policy *policy)
{ … }
static void cpufreq_userspace_policy_exit(struct cpufreq_policy *policy)
{ … }
static int cpufreq_userspace_policy_start(struct cpufreq_policy *policy)
{ … }
static void cpufreq_userspace_policy_stop(struct cpufreq_policy *policy)
{ … }
static void cpufreq_userspace_policy_limits(struct cpufreq_policy *policy)
{ … }
static struct cpufreq_governor cpufreq_gov_userspace = …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE
struct cpufreq_governor *cpufreq_default_governor(void)
{
return &cpufreq_gov_userspace;
}
#endif
cpufreq_governor_init(cpufreq_gov_userspace);
cpufreq_governor_exit(cpufreq_gov_userspace);