aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-01-02 02:04:31 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-01-23 16:49:34 -0500
commit22a7cfb01415cfa4284af20555942c427af452e0 (patch)
tree25b9a21788ae3b8173fee64447625808ff18d5ba
parentbc68b7dfda54373fb5d0cee8c44a070d590b8433 (diff)
cpufreq: get rid of CONFIG_{HOTPLUG_CPU|SMP} mess
These are messing up more than the benefit they provide. It isn't a lot of code anyway, that we will compile without them. Kill them. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/cpufreq/cpufreq.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 0247da2a3350..1e72621ca157 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -958,7 +958,6 @@ static void cpufreq_init_policy(struct cpufreq_policy *policy)
958 } 958 }
959} 959}
960 960
961#ifdef CONFIG_HOTPLUG_CPU
962static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy, 961static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy,
963 unsigned int cpu, struct device *dev) 962 unsigned int cpu, struct device *dev)
964{ 963{
@@ -996,7 +995,6 @@ static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy,
996 995
997 return sysfs_create_link(&dev->kobj, &policy->kobj, "cpufreq"); 996 return sysfs_create_link(&dev->kobj, &policy->kobj, "cpufreq");
998} 997}
999#endif
1000 998
1001static struct cpufreq_policy *cpufreq_policy_restore(unsigned int cpu) 999static struct cpufreq_policy *cpufreq_policy_restore(unsigned int cpu)
1002{ 1000{
@@ -1107,19 +1105,15 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
1107{ 1105{
1108 unsigned int j, cpu = dev->id; 1106 unsigned int j, cpu = dev->id;
1109 int ret = -ENOMEM; 1107 int ret = -ENOMEM;
1110 struct cpufreq_policy *policy; 1108 struct cpufreq_policy *policy, *tpolicy;
1111 unsigned long flags; 1109 unsigned long flags;
1112 bool recover_policy = cpufreq_suspended; 1110 bool recover_policy = cpufreq_suspended;
1113#ifdef CONFIG_HOTPLUG_CPU
1114 struct cpufreq_policy *tpolicy;
1115#endif
1116 1111
1117 if (cpu_is_offline(cpu)) 1112 if (cpu_is_offline(cpu))
1118 return 0; 1113 return 0;
1119 1114
1120 pr_debug("adding CPU %u\n", cpu); 1115 pr_debug("adding CPU %u\n", cpu);
1121 1116
1122#ifdef CONFIG_SMP
1123 /* check whether a different CPU already registered this 1117 /* check whether a different CPU already registered this
1124 * CPU because it is in the same boat. */ 1118 * CPU because it is in the same boat. */
1125 policy = cpufreq_cpu_get(cpu); 1119 policy = cpufreq_cpu_get(cpu);
@@ -1127,12 +1121,10 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
1127 cpufreq_cpu_put(policy); 1121 cpufreq_cpu_put(policy);
1128 return 0; 1122 return 0;
1129 } 1123 }
1130#endif
1131 1124
1132 if (!down_read_trylock(&cpufreq_rwsem)) 1125 if (!down_read_trylock(&cpufreq_rwsem))
1133 return 0; 1126 return 0;
1134 1127
1135#ifdef CONFIG_HOTPLUG_CPU
1136 /* Check if this cpu was hot-unplugged earlier and has siblings */ 1128 /* Check if this cpu was hot-unplugged earlier and has siblings */
1137 read_lock_irqsave(&cpufreq_driver_lock, flags); 1129 read_lock_irqsave(&cpufreq_driver_lock, flags);
1138 list_for_each_entry(tpolicy, &cpufreq_policy_list, policy_list) { 1130 list_for_each_entry(tpolicy, &cpufreq_policy_list, policy_list) {
@@ -1144,7 +1136,6 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif)
1144 } 1136 }
1145 } 1137 }
1146 read_unlock_irqrestore(&cpufreq_driver_lock, flags); 1138 read_unlock_irqrestore(&cpufreq_driver_lock, flags);
1147#endif
1148 1139
1149 /* 1140 /*
1150 * Restore the saved policy when doing light-weight init and fall back 1141 * Restore the saved policy when doing light-weight init and fall back