Skip to contentSkip to conversation

2.5.64 - cpufreq/userspace compile failure (with patch)

PATCH CaT 1 participant 1 message Mar 5, 2003

lore
Share & tools
lore

CaT

author
#0 lore raw

The kernel failed to compile with the cpufreq userspace option being set. I looked at the code a bit and figured the following patch would solve it. Haven't tested the kernel yet though.

cpufreq/userspace.c renamed from cpufreq/userspace.c.old +2 -2
@@ -511,7 +511,7 @@
 		cpu_min_freq[cpu] = policy->min;
 		cpu_max_freq[cpu] = policy->max;
 		cpu_cur_freq[cpu] = policy->cur;
-		device_create_file (policy->intf.dev, &dev_attr_scaling_setspeed);
+		device_create_file (policy->dev, &dev_attr_scaling_setspeed);
 		memcpy (&current_policy[cpu], policy, sizeof(struct cpufreq_policy));
 		up(&userspace_sem);
 		break;
@@ -520,7 +520,7 @@
 		cpu_is_managed[cpu] = 0;
 		cpu_min_freq[cpu] = 0;
 		cpu_max_freq[cpu] = 0;
-		device_remove_file (policy->intf.dev, &dev_attr_scaling_setspeed);
+		device_remove_file (policy->dev, &dev_attr_scaling_setspeed);
 		up(&userspace_sem);
 		module_put(THIS_MODULE);
 		break;

The problem was that intf was not a member of the cpyfreq_policy struct (or any other struct in any related .h files that I could see)

Signature · 4 lines
"Other countries of course, bear the same risk. But there's no doubt his
hatred is mainly directed at us. After all this is the guy who tried to         kill my dad."
        - George W. Bush Jr, 'President' of the United States
          September 26, 2002 (from a political fundraiser in Huston, Texas)