diff options
author | Nishanth Menon <nm@ti.com> | 2012-10-29 15:01:44 -0500 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2012-11-20 18:46:22 +0900 |
commit | 83116e66a232184f733ecf09a41817cf893ede98 (patch) | |
tree | 203d314f47495a7a5615abcd4575567043a4763d /drivers/devfreq/governor_simpleondemand.c | |
parent | 3aa173b8db200bb96354481acc0a5b9e123119fe (diff) | |
download | op-kernel-dev-83116e66a232184f733ecf09a41817cf893ede98.zip op-kernel-dev-83116e66a232184f733ecf09a41817cf893ede98.tar.gz |
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_simpleondemand.c')
-rw-r--r-- | drivers/devfreq/governor_simpleondemand.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/devfreq/governor_simpleondemand.c b/drivers/devfreq/governor_simpleondemand.c index b5cf0fb..85f9ed5 100644 --- a/drivers/devfreq/governor_simpleondemand.c +++ b/drivers/devfreq/governor_simpleondemand.c @@ -125,3 +125,21 @@ const struct devfreq_governor devfreq_simple_ondemand = { .get_target_freq = devfreq_simple_ondemand_func, .event_handler = devfreq_simple_ondemand_handler, }; + +static int __init devfreq_simple_ondemand_init(void) +{ + return devfreq_add_governor(&devfreq_simple_ondemand); +} +subsys_initcall(devfreq_simple_ondemand_init); + +static void __exit devfreq_simple_ondemand_exit(void) +{ + int ret; + + ret = devfreq_remove_governor(&devfreq_simple_ondemand); + if (ret) + pr_err("%s: failed remove governor %d\n", __func__, ret); + + return; +} +module_exit(devfreq_simple_ondemand_exit); |