ef002e
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/cpufreq-nforce2.c linux-3.10.0-229.el7/drivers/cpufreq/cpufreq-nforce2.c
ef002e
--- linux-3.10.0-229.el7.original/drivers/cpufreq/cpufreq-nforce2.c	2015-01-29 18:15:53.000000000 -0500
ef002e
+++ linux-3.10.0-229.el7/drivers/cpufreq/cpufreq-nforce2.c	2015-03-09 09:22:18.376023945 -0400
ef002e
@@ -270,7 +270,7 @@
ef002e
 	pr_debug("Old CPU frequency %d kHz, new %d kHz\n",
ef002e
 	       freqs.old, freqs.new);
ef002e
 
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
ef002e
+	cpufreq_freq_transition_begin(policy, &freqs);
ef002e
 
ef002e
 	/* Disable IRQs */
ef002e
 	/* local_irq_save(flags); */
ef002e
@@ -285,7 +285,7 @@
ef002e
 	/* Enable IRQs */
ef002e
 	/* local_irq_restore(flags); */
ef002e
 
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
ef002e
+	cpufreq_freq_transition_end(policy, &freqs, 0);
ef002e
 
ef002e
 	return 0;
ef002e
 }
ef002e
Binary files linux-3.10.0-229.el7.original/drivers/cpufreq/.cpufreq-nforce2.c.swp and linux-3.10.0-229.el7/drivers/cpufreq/.cpufreq-nforce2.c.swp differ
ef002e
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/exynos5440-cpufreq.c linux-3.10.0-229.el7/drivers/cpufreq/exynos5440-cpufreq.c
ef002e
--- linux-3.10.0-229.el7.original/drivers/cpufreq/exynos5440-cpufreq.c	2015-01-29 18:15:53.000000000 -0500
ef002e
+++ linux-3.10.0-229.el7/drivers/cpufreq/exynos5440-cpufreq.c	2015-03-09 09:22:18.377023945 -0400
ef002e
@@ -238,7 +238,7 @@
ef002e
 	freqs.old = dvfs_info->cur_frequency;
ef002e
 	freqs.new = freq_table[index].frequency;
ef002e
 
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
ef002e
+	cpufreq_freq_transition_begin(policy, &freqs);
ef002e
 
ef002e
 	/* Set the target frequency in all C0_3_PSTATE register */
ef002e
 	for_each_cpu(i, policy->cpus) {
ef002e
@@ -279,7 +279,7 @@
ef002e
 		dev_crit(dvfs_info->dev, "New frequency out of range\n");
ef002e
 		freqs.new = dvfs_info->cur_frequency;
ef002e
 	}
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
ef002e
+	cpufreq_freq_transition_end(policy, &freqs, 0);
ef002e
 
ef002e
 	cpufreq_cpu_put(policy);
ef002e
 	mutex_unlock(&cpufreq_lock);
ef002e
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/gx-suspmod.c linux-3.10.0-229.el7/drivers/cpufreq/gx-suspmod.c
ef002e
--- linux-3.10.0-229.el7.original/drivers/cpufreq/gx-suspmod.c	2015-01-29 18:15:53.000000000 -0500
ef002e
+++ linux-3.10.0-229.el7/drivers/cpufreq/gx-suspmod.c	2015-03-09 09:22:18.377023945 -0400
ef002e
@@ -265,7 +265,7 @@
ef002e
 
ef002e
 	freqs.new = new_khz;
ef002e
 
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
ef002e
+	cpufreq_freq_transition_begin(policy, &freqs);
ef002e
 	local_irq_save(flags);
ef002e
 
ef002e
 	if (new_khz != stock_freq) {
ef002e
@@ -314,7 +314,7 @@
ef002e
 
ef002e
 	gx_params->pci_suscfg = suscfg;
ef002e
 
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
ef002e
+	cpufreq_freq_transition_end(policy, &freqs, 0);
ef002e
 
ef002e
 	pr_debug("suspend modulation w/ duration of ON:%d us, OFF:%d us\n",
ef002e
 		gx_params->on_duration * 32, gx_params->off_duration * 32);
ef002e
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/integrator-cpufreq.c linux-3.10.0-229.el7/drivers/cpufreq/integrator-cpufreq.c
ef002e
--- linux-3.10.0-229.el7.original/drivers/cpufreq/integrator-cpufreq.c	2015-01-29 18:15:53.000000000 -0500
ef002e
+++ linux-3.10.0-229.el7/drivers/cpufreq/integrator-cpufreq.c	2015-03-09 09:22:18.377023945 -0400
ef002e
@@ -121,7 +121,7 @@
ef002e
 		return 0;
ef002e
 	}
ef002e
 
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
ef002e
+	cpufreq_freq_transition_begin(policy, &freqs);
ef002e
 
ef002e
 	cm_osc = __raw_readl(CM_OSC);
ef002e
 
ef002e
@@ -142,7 +142,7 @@
ef002e
 	 */
ef002e
 	set_cpus_allowed(current, cpus_allowed);
ef002e
 
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
ef002e
+	cpufreq_freq_transition_end(policy, &freqs, 0);
ef002e
 
ef002e
 	return 0;
ef002e
 }
ef002e
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/longhaul.c linux-3.10.0-229.el7/drivers/cpufreq/longhaul.c
ef002e
--- linux-3.10.0-229.el7.original/drivers/cpufreq/longhaul.c	2015-01-29 18:15:53.000000000 -0500
ef002e
+++ linux-3.10.0-229.el7/drivers/cpufreq/longhaul.c	2015-03-09 09:22:18.377023945 -0400
ef002e
@@ -269,7 +269,7 @@
ef002e
 	freqs.old = calc_speed(longhaul_get_cpu_mult());
ef002e
 	freqs.new = speed;
ef002e
 
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
ef002e
+	cpufreq_freq_transition_begin(policy, &freqs);
ef002e
 
ef002e
 	pr_debug("Setting to FSB:%dMHz Mult:%d.%dx (%s)\n",
ef002e
 			fsb, mult/10, mult%10, print_speed(speed/1000));
ef002e
@@ -386,7 +386,7 @@
ef002e
 		}
ef002e
 	}
ef002e
 	/* Report true CPU frequency */
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
ef002e
+	cpufreq_freq_transition_end(policy, &freqs, 0);
ef002e
 
ef002e
 	if (!bm_timeout)
ef002e
 		printk(KERN_INFO PFX "Warning: Timeout while waiting for "
ef002e
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/powernow-k6.c linux-3.10.0-229.el7/drivers/cpufreq/powernow-k6.c
ef002e
--- linux-3.10.0-229.el7.original/drivers/cpufreq/powernow-k6.c	2015-01-29 18:15:53.000000000 -0500
ef002e
+++ linux-3.10.0-229.el7/drivers/cpufreq/powernow-k6.c	2015-03-09 09:23:09.182024898 -0400
ef002e
@@ -83,7 +83,7 @@
ef002e
 	freqs.old = busfreq * powernow_k6_get_cpu_multiplier();
ef002e
 	freqs.new = busfreq * clock_ratio[best_i].driver_data;
ef002e
 
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
ef002e
+	cpufreq_freq_transition_begin(policy, &freqs);
ef002e
 
ef002e
 	/* we now need to transform best_i to the BVC format, see AMD#23446 */
ef002e
 
ef002e
@@ -98,7 +98,7 @@
ef002e
 	msrval = POWERNOW_IOPORT + 0x0;
ef002e
 	wrmsr(MSR_K6_EPMR, msrval, 0); /* disable it again */
ef002e
 
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
ef002e
+	cpufreq_freq_transition_end(policy, &freqs, 0);
ef002e
 
ef002e
 	return;
ef002e
 }
ef002e
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/powernow-k7.c linux-3.10.0-229.el7/drivers/cpufreq/powernow-k7.c
ef002e
--- linux-3.10.0-229.el7.original/drivers/cpufreq/powernow-k7.c	2015-01-29 18:15:53.000000000 -0500
ef002e
+++ linux-3.10.0-229.el7/drivers/cpufreq/powernow-k7.c	2015-03-09 09:23:52.126025704 -0400
ef002e
@@ -269,7 +269,7 @@
ef002e
 
ef002e
 	freqs.new = powernow_table[index].frequency;
ef002e
 
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
ef002e
+	cpufreq_freq_transition_begin(policy, &freqs);
ef002e
 
ef002e
 	/* Now do the magic poking into the MSRs.  */
ef002e
 
ef002e
@@ -290,7 +290,7 @@
ef002e
 	if (have_a0 == 1)
ef002e
 		local_irq_enable();
ef002e
 
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
ef002e
+	cpufreq_freq_transition_end(policy, &freqs, 0);
ef002e
 }
ef002e
 
ef002e
 
ef002e
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/sh-cpufreq.c linux-3.10.0-229.el7/drivers/cpufreq/sh-cpufreq.c
ef002e
--- linux-3.10.0-229.el7.original/drivers/cpufreq/sh-cpufreq.c	2015-01-29 18:15:53.000000000 -0500
ef002e
+++ linux-3.10.0-229.el7/drivers/cpufreq/sh-cpufreq.c	2015-03-09 09:22:18.378023945 -0400
ef002e
@@ -68,10 +68,10 @@
ef002e
 	freqs.new	= (freq + 500) / 1000;
ef002e
 	freqs.flags	= 0;
ef002e
 
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
ef002e
+	cpufreq_freq_transition_begin(policy, &freqs);
ef002e
 	set_cpus_allowed_ptr(current, &cpus_allowed);
ef002e
 	clk_set_rate(cpuclk, freq);
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
ef002e
+	cpufreq_freq_transition_end(policy, &freqs, 0);
ef002e
 
ef002e
 	dev_dbg(dev, "set frequency %lu Hz\n", freq);
ef002e
 
ef002e
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-centrino.c linux-3.10.0-229.el7/drivers/cpufreq/speedstep-centrino.c
ef002e
--- linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-centrino.c	2015-01-29 18:15:53.000000000 -0500
ef002e
+++ linux-3.10.0-229.el7/drivers/cpufreq/speedstep-centrino.c	2015-03-09 09:58:30.112064688 -0400
ef002e
@@ -345,7 +345,6 @@
ef002e
 	struct cpuinfo_x86 *cpu = &cpu_data(policy->cpu);
ef002e
 	unsigned freq;
ef002e
 	unsigned l, h;
ef002e
-	int ret;
ef002e
 	int i;
ef002e
 
ef002e
 	/* Only Intel makes Enhanced Speedstep-capable CPUs */
ef002e
@@ -402,15 +401,8 @@
ef002e
 
ef002e
 	pr_debug("centrino_cpu_init: cur=%dkHz\n", policy->cur);
ef002e
 
ef002e
-	ret = cpufreq_frequency_table_cpuinfo(policy,
ef002e
+	return cpufreq_table_validate_and_show(policy,
ef002e
 		per_cpu(centrino_model, policy->cpu)->op_points);
ef002e
-	if (ret)
ef002e
-		return (ret);
ef002e
-
ef002e
-	cpufreq_frequency_table_get_attr(
ef002e
-		per_cpu(centrino_model, policy->cpu)->op_points, policy->cpu);
ef002e
-
ef002e
-	return 0;
ef002e
 }
ef002e
 
ef002e
 static int centrino_cpu_exit(struct cpufreq_policy *policy)
ef002e
@@ -428,19 +420,6 @@
ef002e
 }
ef002e
 
ef002e
 /**
ef002e
- * centrino_verify - verifies a new CPUFreq policy
ef002e
- * @policy: new policy
ef002e
- *
ef002e
- * Limit must be within this model's frequency range at least one
ef002e
- * border included.
ef002e
- */
ef002e
-static int centrino_verify (struct cpufreq_policy *policy)
ef002e
-{
ef002e
-	return cpufreq_frequency_table_verify(policy,
ef002e
-			per_cpu(centrino_model, policy->cpu)->op_points);
ef002e
-}
ef002e
-
ef002e
-/**
ef002e
  * centrino_setpolicy - set a new CPUFreq policy
ef002e
  * @policy: new policy
ef002e
  * @target_freq: the target frequency
ef002e
@@ -561,20 +540,15 @@
ef002e
 	return retval;
ef002e
 }
ef002e
 
ef002e
-static struct freq_attr* centrino_attr[] = {
ef002e
-	&cpufreq_freq_attr_scaling_available_freqs,
ef002e
-	NULL,
ef002e
-};
ef002e
-
ef002e
 static struct cpufreq_driver centrino_driver = {
ef002e
 	.name		= "centrino", /* should be speedstep-centrino,
ef002e
 					 but there's a 16 char limit */
ef002e
 	.init		= centrino_cpu_init,
ef002e
 	.exit		= centrino_cpu_exit,
ef002e
-	.verify		= centrino_verify,
ef002e
+	.verify		= cpufreq_generic_frequency_table_verify,
ef002e
 	.target		= centrino_target,
ef002e
 	.get		= get_cur_freq,
ef002e
-	.attr           = centrino_attr,
ef002e
+	.attr		= cpufreq_generic_attr,
ef002e
 };
ef002e
 
ef002e
 /*
ef002e
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-ich.c linux-3.10.0-229.el7/drivers/cpufreq/speedstep-ich.c
ef002e
--- linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-ich.c	2015-01-29 18:15:53.000000000 -0500
ef002e
+++ linux-3.10.0-229.el7/drivers/cpufreq/speedstep-ich.c	2015-03-09 09:58:30.113064688 -0400
ef002e
@@ -289,18 +289,6 @@
ef002e
 }
ef002e
 
ef002e
 
ef002e
-/**
ef002e
- * speedstep_verify - verifies a new CPUFreq policy
ef002e
- * @policy: new policy
ef002e
- *
ef002e
- * Limit must be within speedstep_low_freq and speedstep_high_freq, with
ef002e
- * at least one border included.
ef002e
- */
ef002e
-static int speedstep_verify(struct cpufreq_policy *policy)
ef002e
-{
ef002e
-	return cpufreq_frequency_table_verify(policy, &speedstep_freqs[0]);
ef002e
-}
ef002e
-
ef002e
 struct get_freqs {
ef002e
 	struct cpufreq_policy *policy;
ef002e
 	int ret;
ef002e
@@ -320,7 +308,6 @@
ef002e
 
ef002e
 static int speedstep_cpu_init(struct cpufreq_policy *policy)
ef002e
 {
ef002e
-	int result;
ef002e
 	unsigned int policy_cpu, speed;
ef002e
 	struct get_freqs gf;
ef002e
 
ef002e
@@ -349,36 +336,18 @@
ef002e
 	/* cpuinfo and default policy values */
ef002e
 	policy->cur = speed;
ef002e
 
ef002e
-	result = cpufreq_frequency_table_cpuinfo(policy, speedstep_freqs);
ef002e
-	if (result)
ef002e
-		return result;
ef002e
-
ef002e
-	cpufreq_frequency_table_get_attr(speedstep_freqs, policy->cpu);
ef002e
-
ef002e
-	return 0;
ef002e
+	return cpufreq_table_validate_and_show(policy, speedstep_freqs);
ef002e
 }
ef002e
 
ef002e
 
ef002e
-static int speedstep_cpu_exit(struct cpufreq_policy *policy)
ef002e
-{
ef002e
-	cpufreq_frequency_table_put_attr(policy->cpu);
ef002e
-	return 0;
ef002e
-}
ef002e
-
ef002e
-static struct freq_attr *speedstep_attr[] = {
ef002e
-	&cpufreq_freq_attr_scaling_available_freqs,
ef002e
-	NULL,
ef002e
-};
ef002e
-
ef002e
-
ef002e
 static struct cpufreq_driver speedstep_driver = {
ef002e
 	.name	= "speedstep-ich",
ef002e
-	.verify	= speedstep_verify,
ef002e
+	.verify	= cpufreq_generic_frequency_table_verify,
ef002e
 	.target	= speedstep_target,
ef002e
 	.init	= speedstep_cpu_init,
ef002e
-	.exit	= speedstep_cpu_exit,
ef002e
+	.exit	= cpufreq_generic_exit,
ef002e
 	.get	= speedstep_get,
ef002e
-	.attr	= speedstep_attr,
ef002e
+	.attr	= cpufreq_generic_attr,
ef002e
 };
ef002e
 
ef002e
 static const struct x86_cpu_id ss_smi_ids[] = {
ef002e
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-smi.c linux-3.10.0-229.el7/drivers/cpufreq/speedstep-smi.c
ef002e
--- linux-3.10.0-229.el7.original/drivers/cpufreq/speedstep-smi.c	2015-01-29 18:15:53.000000000 -0500
ef002e
+++ linux-3.10.0-229.el7/drivers/cpufreq/speedstep-smi.c	2015-03-09 09:58:30.113064688 -0400
ef002e
@@ -264,19 +264,6 @@
ef002e
 }
ef002e
 
ef002e
 
ef002e
-/**
ef002e
- * speedstep_verify - verifies a new CPUFreq policy
ef002e
- * @policy: new policy
ef002e
- *
ef002e
- * Limit must be within speedstep_low_freq and speedstep_high_freq, with
ef002e
- * at least one border included.
ef002e
- */
ef002e
-static int speedstep_verify(struct cpufreq_policy *policy)
ef002e
-{
ef002e
-	return cpufreq_frequency_table_verify(policy, &speedstep_freqs[0]);
ef002e
-}
ef002e
-
ef002e
-
ef002e
 static int speedstep_cpu_init(struct cpufreq_policy *policy)
ef002e
 {
ef002e
 	int result;
ef002e
@@ -329,19 +316,7 @@
ef002e
 	policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
ef002e
 	policy->cur = speed;
ef002e
 
ef002e
-	result = cpufreq_frequency_table_cpuinfo(policy, speedstep_freqs);
ef002e
-	if (result)
ef002e
-		return result;
ef002e
-
ef002e
-	cpufreq_frequency_table_get_attr(speedstep_freqs, policy->cpu);
ef002e
-
ef002e
-	return 0;
ef002e
-}
ef002e
-
ef002e
-static int speedstep_cpu_exit(struct cpufreq_policy *policy)
ef002e
-{
ef002e
-	cpufreq_frequency_table_put_attr(policy->cpu);
ef002e
-	return 0;
ef002e
+	return cpufreq_table_validate_and_show(policy, speedstep_freqs);
ef002e
 }
ef002e
 
ef002e
 static unsigned int speedstep_get(unsigned int cpu)
ef002e
@@ -362,20 +337,15 @@
ef002e
 	return result;
ef002e
 }
ef002e
 
ef002e
-static struct freq_attr *speedstep_attr[] = {
ef002e
-	&cpufreq_freq_attr_scaling_available_freqs,
ef002e
-	NULL,
ef002e
-};
ef002e
-
ef002e
 static struct cpufreq_driver speedstep_driver = {
ef002e
 	.name		= "speedstep-smi",
ef002e
-	.verify		= speedstep_verify,
ef002e
+	.verify		= cpufreq_generic_frequency_table_verify,
ef002e
 	.target		= speedstep_target,
ef002e
 	.init		= speedstep_cpu_init,
ef002e
-	.exit		= speedstep_cpu_exit,
ef002e
+	.exit		= cpufreq_generic_exit,
ef002e
 	.get		= speedstep_get,
ef002e
 	.resume		= speedstep_resume,
ef002e
-	.attr		= speedstep_attr,
ef002e
+	.attr		= cpufreq_generic_attr,
ef002e
 };
ef002e
 
ef002e
 static const struct x86_cpu_id ss_smi_ids[] = {
ef002e
diff -urN linux-3.10.0-229.el7.original/drivers/cpufreq/unicore2-cpufreq.c linux-3.10.0-229.el7/drivers/cpufreq/unicore2-cpufreq.c
ef002e
--- linux-3.10.0-229.el7.original/drivers/cpufreq/unicore2-cpufreq.c	2015-01-29 18:15:53.000000000 -0500
ef002e
+++ linux-3.10.0-229.el7/drivers/cpufreq/unicore2-cpufreq.c	2015-03-09 09:24:33.053026472 -0400
ef002e
@@ -50,14 +50,14 @@
ef002e
 	struct cpufreq_freqs freqs;
ef002e
 	struct clk *mclk = clk_get(NULL, "MAIN_CLK");
ef002e
 
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_PRECHANGE);
ef002e
+	cpufreq_freq_transition_begin(policy, &freqs);
ef002e
 
ef002e
 	if (!clk_set_rate(mclk, target_freq * 1000)) {
ef002e
 		freqs.old = cur;
ef002e
 		freqs.new = target_freq;
ef002e
 	}
ef002e
 
ef002e
-	cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
ef002e
+	cpufreq_freq_transition_end(policy, &freqs, ret);
ef002e
 
ef002e
 	return 0;
ef002e
 }