diff options
author | Nishanth Menon <nm@ti.com> | 2012-10-29 16:01:44 -0400 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2012-11-20 04:46:22 -0500 |
commit | 83116e66a232184f733ecf09a41817cf893ede98 (patch) | |
tree | 203d314f47495a7a5615abcd4575567043a4763d /drivers/devfreq/governor_performance.c | |
parent | 3aa173b8db200bb96354481acc0a5b9e123119fe (diff) |
PM / devfreq: register governors with devfreq framework
With the new registration functions, governors can be now
registered with devfreq framework.
NOTE: generates 'discards qualifiers from pointer target type'
build warnings, which the next patche in this series fixes
Cc: Rajagopal Venkat <rajagopal.venkat@linaro.org>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Kevin Hilman <khilman@ti.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Nishanth Menon <nm@ti.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'drivers/devfreq/governor_performance.c')
-rw-r--r-- | drivers/devfreq/governor_performance.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/devfreq/governor_performance.c b/drivers/devfreq/governor_performance.c index eea3f9bd7894..db8ff77dbed2 100644 --- a/drivers/devfreq/governor_performance.c +++ b/drivers/devfreq/governor_performance.c | |||
@@ -45,3 +45,21 @@ const struct devfreq_governor devfreq_performance = { | |||
45 | .get_target_freq = devfreq_performance_func, | 45 | .get_target_freq = devfreq_performance_func, |
46 | .event_handler = devfreq_performance_handler, | 46 | .event_handler = devfreq_performance_handler, |
47 | }; | 47 | }; |
48 | |||
49 | static int __init devfreq_performance_init(void) | ||
50 | { | ||
51 | return devfreq_add_governor(&devfreq_performance); | ||
52 | } | ||
53 | subsys_initcall(devfreq_performance_init); | ||
54 | |||
55 | static void __exit devfreq_performance_exit(void) | ||
56 | { | ||
57 | int ret; | ||
58 | |||
59 | ret = devfreq_remove_governor(&devfreq_performance); | ||
60 | if (ret) | ||
61 | pr_err("%s: failed remove governor %d\n", __func__, ret); | ||
62 | |||
63 | return; | ||
64 | } | ||
65 | module_exit(devfreq_performance_exit); | ||