[PATCH 3/5] cpufreq: remove unnecessary check in __cpufreq_governor()

From: Viresh Kumar
Date: Tue Aug 20 2013 - 02:40:31 EST


We don't need to check if event is CPUFREQ_GOV_POLICY_INIT and put governor
module as we are sure event can only be START/STOP here.

And so remove this useless check.

Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
---
drivers/cpufreq/cpufreq.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 0302121..b03a851 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1719,8 +1719,6 @@ static int __cpufreq_governor(struct cpufreq_policy *policy,
if ((!policy->governor_enabled && (event == CPUFREQ_GOV_STOP)) ||
(policy->governor_enabled && (event == CPUFREQ_GOV_START))) {
mutex_unlock(&cpufreq_governor_lock);
- if (event == CPUFREQ_GOV_POLICY_INIT)
- module_put(policy->governor->owner);
return -EBUSY;
}

--
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/