diff options
author | Stratos Karafotis <stratosk@semaphore.gr> | 2014-03-19 17:29:17 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-03-19 22:39:28 -0400 |
commit | e5c87b762871c3377e456f6a57769dc63bdddd4b (patch) | |
tree | 04b2582ac53f1010bd7c24896e70500335212446 /drivers/cpufreq/cpufreq.c | |
parent | bfa709bc823fc32ee8dd5220d1711b46078235d8 (diff) |
cpufreq: Fix checkpatch errors and warnings
Fix 2 checkpatch errors about using assignment in if condition,
1 checkpatch error about a required space after comma
and 3 warnings about line over 80 characters.
Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
Acked-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 | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index e3aa9deb40d9..77a99bfea9a9 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -939,8 +939,11 @@ static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy, | |||
939 | up_write(&policy->rwsem); | 939 | up_write(&policy->rwsem); |
940 | 940 | ||
941 | if (has_target()) { | 941 | if (has_target()) { |
942 | if ((ret = __cpufreq_governor(policy, CPUFREQ_GOV_START)) || | 942 | ret = __cpufreq_governor(policy, CPUFREQ_GOV_START); |
943 | (ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS))) { | 943 | if (!ret) |
944 | ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS); | ||
945 | |||
946 | if (ret) { | ||
944 | pr_err("%s: Failed to start governor\n", __func__); | 947 | pr_err("%s: Failed to start governor\n", __func__); |
945 | return ret; | 948 | return ret; |
946 | } | 949 | } |
@@ -1394,14 +1397,14 @@ static int __cpufreq_remove_dev_finish(struct device *dev, | |||
1394 | 1397 | ||
1395 | if (!cpufreq_suspended) | 1398 | if (!cpufreq_suspended) |
1396 | cpufreq_policy_free(policy); | 1399 | cpufreq_policy_free(policy); |
1397 | } else { | 1400 | } else if (has_target()) { |
1398 | if (has_target()) { | 1401 | ret = __cpufreq_governor(policy, CPUFREQ_GOV_START); |
1399 | if ((ret = __cpufreq_governor(policy, CPUFREQ_GOV_START)) || | 1402 | if (!ret) |
1400 | (ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS))) { | 1403 | ret = __cpufreq_governor(policy, CPUFREQ_GOV_LIMITS); |
1401 | pr_err("%s: Failed to start governor\n", | 1404 | |
1402 | __func__); | 1405 | if (ret) { |
1403 | return ret; | 1406 | pr_err("%s: Failed to start governor\n", __func__); |
1404 | } | 1407 | return ret; |
1405 | } | 1408 | } |
1406 | } | 1409 | } |
1407 | 1410 | ||
@@ -2086,7 +2089,7 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy, | |||
2086 | if (old_gov) { | 2089 | if (old_gov) { |
2087 | __cpufreq_governor(policy, CPUFREQ_GOV_STOP); | 2090 | __cpufreq_governor(policy, CPUFREQ_GOV_STOP); |
2088 | up_write(&policy->rwsem); | 2091 | up_write(&policy->rwsem); |
2089 | __cpufreq_governor(policy,CPUFREQ_GOV_POLICY_EXIT); | 2092 | __cpufreq_governor(policy, CPUFREQ_GOV_POLICY_EXIT); |
2090 | down_write(&policy->rwsem); | 2093 | down_write(&policy->rwsem); |
2091 | } | 2094 | } |
2092 | 2095 | ||