diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-01-02 02:04:25 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-01-23 16:49:33 -0500 |
commit | db5f299574267c50067b967f898633d4dec7ecc4 (patch) | |
tree | 2e43bcdfc8f54b4c363ec8b009a3d891fb10d24b /drivers/cpufreq/cpufreq.c | |
parent | 09347b2905169b361e8ff5d75308982165d61c13 (diff) |
cpufreq: merge 'if' blocks in __cpufreq_remove_dev_prepare()
There are two 'if' blocks here, checking for !cpufreq_driver->setpolicy and
has_target(). Both are actually doing the same thing, merge them.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq.c')
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 4c70f7aa9b1e..626ef841479a 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -1371,11 +1371,10 @@ static int __cpufreq_remove_dev_prepare(struct device *dev, | |||
1371 | pr_err("%s: Failed to stop governor\n", __func__); | 1371 | pr_err("%s: Failed to stop governor\n", __func__); |
1372 | return ret; | 1372 | return ret; |
1373 | } | 1373 | } |
1374 | } | ||
1375 | 1374 | ||
1376 | if (!cpufreq_driver->setpolicy) | ||
1377 | strncpy(per_cpu(cpufreq_cpu_governor, cpu), | 1375 | strncpy(per_cpu(cpufreq_cpu_governor, cpu), |
1378 | policy->governor->name, CPUFREQ_NAME_LEN); | 1376 | policy->governor->name, CPUFREQ_NAME_LEN); |
1377 | } | ||
1379 | 1378 | ||
1380 | down_read(&policy->rwsem); | 1379 | down_read(&policy->rwsem); |
1381 | cpus = cpumask_weight(policy->cpus); | 1380 | cpus = cpumask_weight(policy->cpus); |