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>
This commit is contained in:

committed by
MyungJoo Ham

parent
3aa173b8db
commit
83116e66a2
@@ -140,3 +140,21 @@ const struct devfreq_governor devfreq_userspace = {
|
||||
.get_target_freq = devfreq_userspace_func,
|
||||
.event_handler = devfreq_userspace_handler,
|
||||
};
|
||||
|
||||
static int __init devfreq_userspace_init(void)
|
||||
{
|
||||
return devfreq_add_governor(&devfreq_userspace);
|
||||
}
|
||||
subsys_initcall(devfreq_userspace_init);
|
||||
|
||||
static void __exit devfreq_userspace_exit(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = devfreq_remove_governor(&devfreq_userspace);
|
||||
if (ret)
|
||||
pr_err("%s: failed remove governor %d\n", __func__, ret);
|
||||
|
||||
return;
|
||||
}
|
||||
module_exit(devfreq_userspace_exit);
|
||||
|
Reference in New Issue
Block a user