summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-01-15 19:50:28 +0000
committerMike Frysinger <vapier@gentoo.org>2010-01-15 19:50:28 +0000
commitf926c7a574775fbe6547267069136c43713aed53 (patch)
treedcac7a09819083e33bdb056d5416bbfa39399eda /sys-power/cpufrequtils/files
parentLICENSE is identical with BSD, bug 301123. (diff)
downloadgentoo-2-f926c7a574775fbe6547267069136c43713aed53.tar.gz
gentoo-2-f926c7a574775fbe6547267069136c43713aed53.tar.bz2
gentoo-2-f926c7a574775fbe6547267069136c43713aed53.zip
Drop the modprobe patch since the kernel handles this for us automatically.
(Portage version: 2.2_rc61/cvs/Linux x86_64)
Diffstat (limited to 'sys-power/cpufrequtils/files')
-rw-r--r--sys-power/cpufrequtils/files/cpufrequtils-006-modprobe-gov.patch50
1 files changed, 0 insertions, 50 deletions
diff --git a/sys-power/cpufrequtils/files/cpufrequtils-006-modprobe-gov.patch b/sys-power/cpufrequtils/files/cpufrequtils-006-modprobe-gov.patch
deleted file mode 100644
index 4011f77bf236..000000000000
--- a/sys-power/cpufrequtils/files/cpufrequtils-006-modprobe-gov.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-if a gov isnt loaded, try to modprobe it first
-
-http://bugs.gentoo.org/204069
-
---- a/lib/sysfs.c
-+++ b/lib/sysfs.c
-@@ -12,6 +12,7 @@
- #include <limits.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-+#include <sys/wait.h>
- #include <fcntl.h>
- #include <unistd.h>
-
-@@ -539,8 +540,23 @@ static int verify_gov(char *new_gov, char *passed_gov)
- return 0;
- }
-
-+static int modprobe(const char *module)
-+{
-+ char new_module[strlen(module) + 10];
-+ int status;
-+ pid_t child;
-+
-+ sprintf(new_module, "cpufreq_%s", module);
-+ child = vfork();
-+ if (child == 0)
-+ _exit(execlp("modprobe", "modprobe", "-q", new_module, NULL));
-+ waitpid(child, &status, 0);
-+ return (WIFEXITED(status) && WEXITSTATUS(status) == 0 ? 0 : 1);
-+}
-+
- int sysfs_modify_policy_governor(unsigned int cpu, char *governor)
- {
-+ int ret;
- char new_gov[SYSFS_PATH_MAX];
-
- if (!governor)
-@@ -549,7 +565,10 @@ int sysfs_modify_policy_governor(unsigned int cpu, char *governor)
- if (verify_gov(new_gov, governor))
- return -EINVAL;
-
-- return sysfs_write_one_value(cpu, WRITE_SCALING_GOVERNOR, new_gov, strlen(new_gov));
-+ ret = sysfs_write_one_value(cpu, WRITE_SCALING_GOVERNOR, new_gov, strlen(new_gov));
-+ if (ret == -ENODEV && modprobe(new_gov) == 0)
-+ return sysfs_write_one_value(cpu, WRITE_SCALING_GOVERNOR, new_gov, strlen(new_gov));
-+ return ret;
- };
-
- int sysfs_modify_policy_max(unsigned int cpu, unsigned long max_freq)