summaryrefslogtreecommitdiffstats
path: root/drivers/cpuidle/governor.c
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2016-10-05 09:33:12 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-10-21 14:49:51 +0200
commite5f1b245870d59be0e6cc3b33edf5406a3b59648 (patch)
tree0cb68a8a30bfd340cffa84e16bba73967729bccd /drivers/cpuidle/governor.c
parentLinux 4.9-rc1 (diff)
downloadlinux-e5f1b245870d59be0e6cc3b33edf5406a3b59648.tar.xz
linux-e5f1b245870d59be0e6cc3b33edf5406a3b59648.zip
cpuidle: governors: Remove remaining old module code
The governor's code use try_module_get() and put_module() to refcount the governor's module. But the governors are not compiled as module. The refcount does not prevent to switch the governor or unload a module as they aren't compiled as modules. The code is pointless, so remove it. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpuidle/governor.c')
-rw-r--r--drivers/cpuidle/governor.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/cpuidle/governor.c b/drivers/cpuidle/governor.c
index fb9f511cca23..4e78263e34a4 100644
--- a/drivers/cpuidle/governor.c
+++ b/drivers/cpuidle/governor.c
@@ -9,7 +9,6 @@
*/
#include <linux/mutex.h>
-#include <linux/module.h>
#include <linux/cpuidle.h>
#include "cpuidle.h"
@@ -53,14 +52,11 @@ int cpuidle_switch_governor(struct cpuidle_governor *gov)
if (cpuidle_curr_governor) {
list_for_each_entry(dev, &cpuidle_detected_devices, device_list)
cpuidle_disable_device(dev);
- module_put(cpuidle_curr_governor->owner);
}
cpuidle_curr_governor = gov;
if (gov) {
- if (!try_module_get(cpuidle_curr_governor->owner))
- return -EINVAL;
list_for_each_entry(dev, &cpuidle_detected_devices, device_list)
cpuidle_enable_device(dev);
cpuidle_install_idle_handler();