return sysfs_get_freq_hardware_limits(cpu, min, max);
}
-char * cpufreq_get_driver(unsigned int cpu) {
+char *cpufreq_get_driver(unsigned int cpu)
+{
return sysfs_get_freq_driver(cpu);
}
-void cpufreq_put_driver(char * ptr) {
+void cpufreq_put_driver(char *ptr)
+{
if (!ptr)
return;
free(ptr);
}
-struct cpufreq_policy * cpufreq_get_policy(unsigned int cpu) {
+struct cpufreq_policy *cpufreq_get_policy(unsigned int cpu)
+{
return sysfs_get_freq_policy(cpu);
}
-void cpufreq_put_policy(struct cpufreq_policy *policy) {
+void cpufreq_put_policy(struct cpufreq_policy *policy)
+{
if ((!policy) || (!policy->governor))
return;
free(policy);
}
-struct cpufreq_available_governors * cpufreq_get_available_governors(unsigned int cpu) {
+struct cpufreq_available_governors *cpufreq_get_available_governors(unsigned
+ int cpu)
+{
return sysfs_get_freq_available_governors(cpu);
}
-void cpufreq_put_available_governors(struct cpufreq_available_governors *any) {
+void cpufreq_put_available_governors(struct cpufreq_available_governors *any)
+{
struct cpufreq_available_governors *tmp, *next;
if (!any)
}
-struct cpufreq_available_frequencies * cpufreq_get_available_frequencies(unsigned int cpu) {
+struct cpufreq_available_frequencies
+*cpufreq_get_available_frequencies(unsigned int cpu)
+{
return sysfs_get_available_frequencies(cpu);
}
-void cpufreq_put_available_frequencies(struct cpufreq_available_frequencies *any) {
+void cpufreq_put_available_frequencies(struct cpufreq_available_frequencies
+ *any) {
struct cpufreq_available_frequencies *tmp, *next;
if (!any)
}
-struct cpufreq_affected_cpus * cpufreq_get_affected_cpus(unsigned int cpu) {
+struct cpufreq_affected_cpus *cpufreq_get_affected_cpus(unsigned int cpu)
+{
return sysfs_get_freq_affected_cpus(cpu);
}
-void cpufreq_put_affected_cpus(struct cpufreq_affected_cpus *any) {
+void cpufreq_put_affected_cpus(struct cpufreq_affected_cpus *any)
+{
struct cpufreq_affected_cpus *tmp, *next;
if (!any)
}
-struct cpufreq_affected_cpus * cpufreq_get_related_cpus(unsigned int cpu) {
+struct cpufreq_affected_cpus *cpufreq_get_related_cpus(unsigned int cpu)
+{
return sysfs_get_freq_related_cpus(cpu);
}
-void cpufreq_put_related_cpus(struct cpufreq_affected_cpus *any) {
+void cpufreq_put_related_cpus(struct cpufreq_affected_cpus *any)
+{
cpufreq_put_affected_cpus(any);
}
-int cpufreq_set_policy(unsigned int cpu, struct cpufreq_policy *policy) {
+int cpufreq_set_policy(unsigned int cpu, struct cpufreq_policy *policy)
+{
if (!policy || !(policy->governor))
return -EINVAL;
}
-int cpufreq_modify_policy_min(unsigned int cpu, unsigned long min_freq) {
+int cpufreq_modify_policy_min(unsigned int cpu, unsigned long min_freq)
+{
return sysfs_modify_freq_policy_min(cpu, min_freq);
}
-int cpufreq_modify_policy_max(unsigned int cpu, unsigned long max_freq) {
+int cpufreq_modify_policy_max(unsigned int cpu, unsigned long max_freq)
+{
return sysfs_modify_freq_policy_max(cpu, max_freq);
}
-int cpufreq_modify_policy_governor(unsigned int cpu, char *governor) {
+int cpufreq_modify_policy_governor(unsigned int cpu, char *governor)
+{
if ((!governor) || (strlen(governor) > 19))
return -EINVAL;
return sysfs_modify_freq_policy_governor(cpu, governor);
}
-int cpufreq_set_frequency(unsigned int cpu, unsigned long target_frequency) {
+int cpufreq_set_frequency(unsigned int cpu, unsigned long target_frequency)
+{
return sysfs_set_frequency(cpu, target_frequency);
}
-struct cpufreq_stats * cpufreq_get_stats(unsigned int cpu, unsigned long long *total_time) {
- struct cpufreq_stats *ret;
-
- ret = sysfs_get_freq_stats(cpu, total_time);
- return (ret);
+struct cpufreq_stats *cpufreq_get_stats(unsigned int cpu,
+ unsigned long long *total_time)
+{
+ return sysfs_get_freq_stats(cpu, total_time);
}
-void cpufreq_put_stats(struct cpufreq_stats *any) {
+void cpufreq_put_stats(struct cpufreq_stats *any)
+{
struct cpufreq_stats *tmp, *next;
if (!any)
}
}
-unsigned long cpufreq_get_transitions(unsigned int cpu) {
- unsigned long ret = sysfs_get_freq_transitions(cpu);
-
- return (ret);
+unsigned long cpufreq_get_transitions(unsigned int cpu)
+{
+ return sysfs_get_freq_transitions(cpu);
}
* considerations by cpufreq policy notifiers in the kernel.
*/
-extern int cpufreq_get_hardware_limits(unsigned int cpu,
- unsigned long *min,
- unsigned long *max);
+extern int cpufreq_get_hardware_limits(unsigned int cpu,
+ unsigned long *min,
+ unsigned long *max);
/* determine CPUfreq driver used
* to avoid memory leakage, please.
*/
-extern char * cpufreq_get_driver(unsigned int cpu);
+extern char *cpufreq_get_driver(unsigned int cpu);
-extern void cpufreq_put_driver(char * ptr);
+extern void cpufreq_put_driver(char *ptr);
/* determine CPUfreq policy currently used
*/
-extern struct cpufreq_policy * cpufreq_get_policy(unsigned int cpu);
+extern struct cpufreq_policy *cpufreq_get_policy(unsigned int cpu);
extern void cpufreq_put_policy(struct cpufreq_policy *policy);
*/
-extern struct cpufreq_available_governors * cpufreq_get_available_governors(unsigned int cpu);
+extern struct cpufreq_available_governors
+*cpufreq_get_available_governors(unsigned int cpu);
-extern void cpufreq_put_available_governors(struct cpufreq_available_governors *first);
+extern void cpufreq_put_available_governors(
+ struct cpufreq_available_governors *first);
/* determine CPU frequency states available
*
- * only present on _some_ ->target() cpufreq drivers. For information purposes
- * only. Please free allocated memory by calling cpufreq_put_available_frequencies
- * after use.
+ * Only present on _some_ ->target() cpufreq drivers. For information purposes
+ * only. Please free allocated memory by calling
+ * cpufreq_put_available_frequencies after use.
*/
-extern struct cpufreq_available_frequencies * cpufreq_get_available_frequencies(unsigned int cpu);
+extern struct cpufreq_available_frequencies
+*cpufreq_get_available_frequencies(unsigned int cpu);
-extern void cpufreq_put_available_frequencies(struct cpufreq_available_frequencies *first);
+extern void cpufreq_put_available_frequencies(
+ struct cpufreq_available_frequencies *first);
-/* determine affected CPUs
+/* determine affected CPUs
*
* Remember to call cpufreq_put_affected_cpus when no longer needed
* to avoid memory leakage, please.
*/
-extern struct cpufreq_affected_cpus * cpufreq_get_affected_cpus(unsigned int cpu);
+extern struct cpufreq_affected_cpus *cpufreq_get_affected_cpus(unsigned
+ int cpu);
extern void cpufreq_put_affected_cpus(struct cpufreq_affected_cpus *first);
-/* determine related CPUs
+/* determine related CPUs
*
* Remember to call cpufreq_put_related_cpus when no longer needed
* to avoid memory leakage, please.
*/
-extern struct cpufreq_affected_cpus * cpufreq_get_related_cpus(unsigned int cpu);
+extern struct cpufreq_affected_cpus *cpufreq_get_related_cpus(unsigned
+ int cpu);
extern void cpufreq_put_related_cpus(struct cpufreq_affected_cpus *first);
* This is not available in all kernel versions or configurations.
*/
-extern struct cpufreq_stats * cpufreq_get_stats(unsigned int cpu, unsigned long long *total_time);
+extern struct cpufreq_stats *cpufreq_get_stats(unsigned int cpu,
+ unsigned long long *total_time);
extern void cpufreq_put_stats(struct cpufreq_stats *stats);
extern unsigned long cpufreq_get_transitions(unsigned int cpu);
-/* set new cpufreq policy
- *
+/* set new cpufreq policy
+ *
* Tries to set the passed policy as new policy as close as possible,
* but results may differ depending e.g. on governors being available.
*/
extern int cpufreq_set_policy(unsigned int cpu, struct cpufreq_policy *policy);
-/* modify a policy by only changing min/max freq or governor
+/* modify a policy by only changing min/max freq or governor
*
* Does not check whether result is what was intended.
*/
/* set a specific frequency
*
* Does only work if userspace governor can be used and no external
- * interference (other calls to this function or to set/modify_policy)
+ * interference (other calls to this function or to set/modify_policy)
* occurs. Also does not work on ->range() cpufreq drivers.
*/
-extern int cpufreq_set_frequency(unsigned int cpu, unsigned long target_frequency);
+extern int cpufreq_set_frequency(unsigned int cpu,
+ unsigned long target_frequency);
#ifdef __cplusplus
}
static unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen)
{
int fd;
- size_t numread;
+ ssize_t numread;
- if ( ( fd = open(path, O_RDONLY) ) == -1 )
+ fd = open(path, O_RDONLY);
+ if (fd == -1)
return 0;
numread = read(fd, buf, buflen - 1);
- if ( numread < 1 )
- {
+ if (numread < 1) {
close(fd);
return 0;
}
buf[numread] = '\0';
close(fd);
- return numread;
+ return (unsigned int) numread;
}
{
char path[SYSFS_PATH_MAX];
int fd;
- size_t numwrite;
+ ssize_t numwrite;
snprintf(path, sizeof(path), PATH_TO_CPU "cpu%u/cpufreq/%s",
cpu, fname);
- if ( ( fd = open(path, O_WRONLY) ) == -1 )
+ fd = open(path, O_WRONLY);
+ if (fd == -1)
return 0;
numwrite = write(fd, value, len);
- if ( numwrite < 1 )
- {
+ if (numwrite < 1) {
close(fd);
return 0;
}
close(fd);
- return numwrite;
+ return (unsigned int) numwrite;
}
/* read access to files which contain one numeric value */
static unsigned long sysfs_cpufreq_get_one_value(unsigned int cpu,
enum cpufreq_value which)
{
- unsigned long value;
+ unsigned long value;
unsigned int len;
char linebuf[MAX_LINE_LEN];
char *endp;
- if ( which >= MAX_CPUFREQ_VALUE_READ_FILES )
+ if (which >= MAX_CPUFREQ_VALUE_READ_FILES)
return 0;
- if ( ( len = sysfs_cpufreq_read_file(cpu, cpufreq_value_files[which],
- linebuf, sizeof(linebuf))) == 0 )
+ len = sysfs_cpufreq_read_file(cpu, cpufreq_value_files[which],
+ linebuf, sizeof(linebuf));
+
+ if (len == 0)
return 0;
value = strtoul(linebuf, &endp, 0);
- if ( endp == linebuf || errno == ERANGE )
+ if (endp == linebuf || errno == ERANGE)
return 0;
return value;
};
-static char * sysfs_cpufreq_get_one_string(unsigned int cpu,
+static char *sysfs_cpufreq_get_one_string(unsigned int cpu,
enum cpufreq_string which)
{
char linebuf[MAX_LINE_LEN];
if (which >= MAX_CPUFREQ_STRING_FILES)
return NULL;
- if ( ( len = sysfs_cpufreq_read_file(cpu, cpufreq_string_files[which],
- linebuf, sizeof(linebuf))) == 0 )
+ len = sysfs_cpufreq_read_file(cpu, cpufreq_string_files[which],
+ linebuf, sizeof(linebuf));
+ if (len == 0)
return NULL;
- if ( ( result = strdup(linebuf) ) == NULL )
+ result = strdup(linebuf);
+ if (result == NULL)
return NULL;
if (result[strlen(result) - 1] == '\n')
if (which >= MAX_CPUFREQ_WRITE_FILES)
return 0;
- if ( sysfs_cpufreq_write_file(cpu, cpufreq_write_files[which],
- new_value, len) != len )
+ if (sysfs_cpufreq_write_file(cpu, cpufreq_write_files[which],
+ new_value, len) != len)
return -ENODEV;
return 0;
return 0;
}
-char * sysfs_get_freq_driver(unsigned int cpu) {
+char *sysfs_get_freq_driver(unsigned int cpu)
+{
return sysfs_cpufreq_get_one_string(cpu, SCALING_DRIVER);
}
-struct cpufreq_policy * sysfs_get_freq_policy(unsigned int cpu) {
+struct cpufreq_policy *sysfs_get_freq_policy(unsigned int cpu)
+{
struct cpufreq_policy *policy;
policy = malloc(sizeof(struct cpufreq_policy));
unsigned int pos, i;
unsigned int len;
- if ( ( len = sysfs_cpufreq_read_file(cpu, "scaling_available_governors",
- linebuf, sizeof(linebuf))) == 0 )
- {
+ len = sysfs_cpufreq_read_file(cpu, "scaling_available_governors",
+ linebuf, sizeof(linebuf));
+ if (len == 0)
return NULL;
- }
pos = 0;
- for ( i = 0; i < len; i++ )
- {
- if ( linebuf[i] == ' ' || linebuf[i] == '\n' )
- {
- if ( i - pos < 2 )
+ for (i = 0; i < len; i++) {
+ if (linebuf[i] == ' ' || linebuf[i] == '\n') {
+ if (i - pos < 2)
continue;
- if ( current ) {
- current->next = malloc(sizeof *current );
- if ( ! current->next )
+ if (current) {
+ current->next = malloc(sizeof(*current));
+ if (!current->next)
goto error_out;
current = current->next;
} else {
- first = malloc( sizeof *first );
- if ( ! first )
+ first = malloc(sizeof(*first));
+ if (!first)
goto error_out;
current = first;
}
current->next = NULL;
current->governor = malloc(i - pos + 1);
- if ( ! current->governor )
+ if (!current->governor)
goto error_out;
- memcpy( current->governor, linebuf + pos, i - pos);
+ memcpy(current->governor, linebuf + pos, i - pos);
current->governor[i - pos] = '\0';
pos = i + 1;
}
return first;
error_out:
- while ( first ) {
+ while (first) {
current = first->next;
- if ( first->governor )
- free( first->governor );
- free( first );
+ if (first->governor)
+ free(first->governor);
+ free(first);
first = current;
}
return NULL;
unsigned int pos, i;
unsigned int len;
- if ( ( len = sysfs_cpufreq_read_file(cpu,
- "scaling_available_frequencies",
- linebuf, sizeof(linebuf))) == 0 )
- {
+ len = sysfs_cpufreq_read_file(cpu, "scaling_available_frequencies",
+ linebuf, sizeof(linebuf));
+ if (len == 0)
return NULL;
- }
pos = 0;
- for ( i = 0; i < len; i++ )
- {
- if ( linebuf[i] == ' ' || linebuf[i] == '\n' )
- {
- if ( i - pos < 2 )
+ for (i = 0; i < len; i++) {
+ if (linebuf[i] == ' ' || linebuf[i] == '\n') {
+ if (i - pos < 2)
continue;
- if ( i - pos >= SYSFS_PATH_MAX )
+ if (i - pos >= SYSFS_PATH_MAX)
goto error_out;
- if ( current ) {
- current->next = malloc(sizeof *current );
- if ( ! current->next )
+ if (current) {
+ current->next = malloc(sizeof(*current));
+ if (!current->next)
goto error_out;
current = current->next;
} else {
- first = malloc(sizeof *first );
- if ( ! first )
+ first = malloc(sizeof(*first));
+ if (!first)
goto error_out;
current = first;
}
memcpy(one_value, linebuf + pos, i - pos);
one_value[i - pos] = '\0';
- if ( sscanf(one_value, "%lu", ¤t->frequency) != 1 )
+ if (sscanf(one_value, "%lu", ¤t->frequency) != 1)
goto error_out;
pos = i + 1;
return first;
error_out:
- while ( first ) {
+ while (first) {
current = first->next;
free(first);
first = current;
return NULL;
}
-static struct cpufreq_affected_cpus * sysfs_get_cpu_list(unsigned int cpu,
- const char *file) {
+static struct cpufreq_affected_cpus *sysfs_get_cpu_list(unsigned int cpu,
+ const char *file)
+{
struct cpufreq_affected_cpus *first = NULL;
struct cpufreq_affected_cpus *current = NULL;
char one_value[SYSFS_PATH_MAX];
unsigned int pos, i;
unsigned int len;
- if ( ( len = sysfs_cpufreq_read_file(cpu, file, linebuf,
- sizeof(linebuf))) == 0 )
- {
+ len = sysfs_cpufreq_read_file(cpu, file, linebuf, sizeof(linebuf));
+ if (len == 0)
return NULL;
- }
pos = 0;
- for ( i = 0; i < len; i++ )
- {
- if ( i == len || linebuf[i] == ' ' || linebuf[i] == '\n' )
- {
- if ( i - pos < 1 )
+ for (i = 0; i < len; i++) {
+ if (i == len || linebuf[i] == ' ' || linebuf[i] == '\n') {
+ if (i - pos < 1)
continue;
- if ( i - pos >= SYSFS_PATH_MAX )
+ if (i - pos >= SYSFS_PATH_MAX)
goto error_out;
- if ( current ) {
- current->next = malloc(sizeof *current);
- if ( ! current->next )
+ if (current) {
+ current->next = malloc(sizeof(*current));
+ if (!current->next)
goto error_out;
current = current->next;
} else {
- first = malloc(sizeof *first);
- if ( ! first )
+ first = malloc(sizeof(*first));
+ if (!first)
goto error_out;
current = first;
}
memcpy(one_value, linebuf + pos, i - pos);
one_value[i - pos] = '\0';
- if ( sscanf(one_value, "%u", ¤t->cpu) != 1 )
+ if (sscanf(one_value, "%u", ¤t->cpu) != 1)
goto error_out;
pos = i + 1;
return NULL;
}
-struct cpufreq_affected_cpus * sysfs_get_freq_affected_cpus(unsigned int cpu) {
+struct cpufreq_affected_cpus *sysfs_get_freq_affected_cpus(unsigned int cpu)
+{
return sysfs_get_cpu_list(cpu, "affected_cpus");
}
-struct cpufreq_affected_cpus * sysfs_get_freq_related_cpus(unsigned int cpu) {
+struct cpufreq_affected_cpus *sysfs_get_freq_related_cpus(unsigned int cpu)
+{
return sysfs_get_cpu_list(cpu, "related_cpus");
}
-struct cpufreq_stats * sysfs_get_freq_stats(unsigned int cpu, unsigned long long *total_time) {
+struct cpufreq_stats *sysfs_get_freq_stats(unsigned int cpu,
+ unsigned long long *total_time) {
struct cpufreq_stats *first = NULL;
struct cpufreq_stats *current = NULL;
char one_value[SYSFS_PATH_MAX];
unsigned int pos, i;
unsigned int len;
- if ( ( len = sysfs_cpufreq_read_file(cpu, "stats/time_in_state",
- linebuf, sizeof(linebuf))) == 0 )
+ len = sysfs_cpufreq_read_file(cpu, "stats/time_in_state",
+ linebuf, sizeof(linebuf));
+ if (len == 0)
return NULL;
*total_time = 0;
pos = 0;
- for ( i = 0; i < len; i++ )
- {
- if ( i == strlen(linebuf) || linebuf[i] == '\n' )
- {
- if ( i - pos < 2 )
+ for (i = 0; i < len; i++) {
+ if (i == strlen(linebuf) || linebuf[i] == '\n') {
+ if (i - pos < 2)
continue;
- if ( (i - pos) >= SYSFS_PATH_MAX )
+ if ((i - pos) >= SYSFS_PATH_MAX)
goto error_out;
- if ( current ) {
- current->next = malloc(sizeof *current );
- if ( ! current->next )
+ if (current) {
+ current->next = malloc(sizeof(*current));
+ if (!current->next)
goto error_out;
current = current->next;
} else {
- first = malloc(sizeof *first );
- if ( ! first )
+ first = malloc(sizeof(*first));
+ if (!first)
goto error_out;
current = first;
}
memcpy(one_value, linebuf + pos, i - pos);
one_value[i - pos] = '\0';
- if ( sscanf(one_value, "%lu %llu", ¤t->frequency, ¤t->time_in_state) != 2 )
+ if (sscanf(one_value, "%lu %llu",
+ ¤t->frequency,
+ ¤t->time_in_state) != 2)
goto error_out;
*total_time = *total_time + current->time_in_state;
return first;
error_out:
- while ( first ) {
+ while (first) {
current = first->next;
free(first);
first = current;
static int verify_gov(char *new_gov, char *passed_gov)
{
- unsigned int i, j=0;
+ unsigned int i, j = 0;
if (!passed_gov || (strlen(passed_gov) > 19))
return -EINVAL;
strncpy(new_gov, passed_gov, 20);
- for (i=0;i<20;i++) {
+ for (i = 0; i < 20; i++) {
if (j) {
new_gov[i] = '\0';
continue;
}
- if ((new_gov[i] >= 'a') && (new_gov[i] <= 'z')) {
+ if ((new_gov[i] >= 'a') && (new_gov[i] <= 'z'))
continue;
- }
- if ((new_gov[i] >= 'A') && (new_gov[i] <= 'Z')) {
+
+ if ((new_gov[i] >= 'A') && (new_gov[i] <= 'Z'))
continue;
- }
- if (new_gov[i] == '-') {
+
+ if (new_gov[i] == '-')
continue;
- }
- if (new_gov[i] == '_') {
+
+ if (new_gov[i] == '_')
continue;
- }
+
if (new_gov[i] == '\0') {
j = 1;
continue;
gov, strlen(gov));
}
-int sysfs_set_frequency(unsigned int cpu, unsigned long target_frequency) {
+int sysfs_set_frequency(unsigned int cpu, unsigned long target_frequency)
+{
struct cpufreq_policy *pol = sysfs_get_freq_policy(cpu);
char userspace_gov[] = "userspace";
char freq[SYSFS_PATH_MAX];
ret = sysfs_modify_freq_policy_governor(cpu, userspace_gov);
if (ret) {
cpufreq_put_policy(pol);
- return (ret);
+ return ret;
}
}
snprintf(file, SYSFS_PATH_MAX, PATH_TO_CPU "cpu%u/", cpu);
- if ( stat(file, &statbuf) != 0 )
+ if (stat(file, &statbuf) != 0)
return -ENOSYS;
return S_ISDIR(statbuf.st_mode) ? 0 : -ENOSYS;
extern unsigned long sysfs_get_freq_kernel(unsigned int cpu);
extern unsigned long sysfs_get_freq_hardware(unsigned int cpu);
extern unsigned long sysfs_get_freq_transition_latency(unsigned int cpu);
-extern int sysfs_get_freq_hardware_limits(unsigned int cpu, unsigned long *min, unsigned long *max);
-extern char * sysfs_get_freq_driver(unsigned int cpu);
-extern struct cpufreq_policy * sysfs_get_freq_policy(unsigned int cpu);
-extern struct cpufreq_available_governors * sysfs_get_freq_available_governors(unsigned int cpu);
-extern struct cpufreq_available_frequencies * sysfs_get_available_frequencies(unsigned int cpu);
-extern struct cpufreq_affected_cpus * sysfs_get_freq_affected_cpus(unsigned int cpu);
-extern struct cpufreq_affected_cpus * sysfs_get_freq_related_cpus(unsigned int cpu);
-extern struct cpufreq_stats * sysfs_get_freq_stats(unsigned int cpu, unsigned long long *total_time);
+extern int sysfs_get_freq_hardware_limits(unsigned int cpu,
+ unsigned long *min, unsigned long *max);
+extern char *sysfs_get_freq_driver(unsigned int cpu);
+extern struct cpufreq_policy *sysfs_get_freq_policy(unsigned int cpu);
+extern struct cpufreq_available_governors *sysfs_get_freq_available_governors(
+ unsigned int cpu);
+extern struct cpufreq_available_frequencies *sysfs_get_available_frequencies(
+ unsigned int cpu);
+extern struct cpufreq_affected_cpus *sysfs_get_freq_affected_cpus(
+ unsigned int cpu);
+extern struct cpufreq_affected_cpus *sysfs_get_freq_related_cpus(
+ unsigned int cpu);
+extern struct cpufreq_stats *sysfs_get_freq_stats(unsigned int cpu,
+ unsigned long long *total_time);
extern unsigned long sysfs_get_freq_transitions(unsigned int cpu);
-extern int sysfs_set_freq_policy(unsigned int cpu, struct cpufreq_policy *policy);
-extern int sysfs_modify_freq_policy_min(unsigned int cpu, unsigned long min_freq);
-extern int sysfs_modify_freq_policy_max(unsigned int cpu, unsigned long max_freq);
+extern int sysfs_set_freq_policy(unsigned int cpu,
+ struct cpufreq_policy *policy);
+extern int sysfs_modify_freq_policy_min(unsigned int cpu,
+ unsigned long min_freq);
+extern int sysfs_modify_freq_policy_max(unsigned int cpu,
+ unsigned long max_freq);
extern int sysfs_modify_freq_policy_governor(unsigned int cpu, char *governor);
-extern int sysfs_set_frequency(unsigned int cpu, unsigned long target_frequency);
+extern int sysfs_set_frequency(unsigned int cpu,
+ unsigned long target_frequency);