]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: Split cpufreq_governor() into simpler functions
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 13 May 2016 23:01:46 +0000 (01:01 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 30 May 2016 12:34:17 +0000 (14:34 +0200)
commitbc599281b54ef66da912401ae88365e82f96a704
treeac817b44523f5d789c11a0e4f6e3be7ce46ea9d0
parent32129d9701e8d448a022832150cd84d75cb735a6
cpufreq: Split cpufreq_governor() into simpler functions

The cpufreq_governor() routine is used by the cpufreq core to invoke
the current governor's ->governor() callback with appropriate arguments
and do some housekeeping related to that.  Unfortunately, the way it
mixes different governor events in one code path makes it rather hard
to follow the code.

For this reason, split cpufreq_governor() into five simpler functions
that each will handle just one specific governor event and put all of
the code related to the given event into its own function.

This change is a prerequisite for a redesign of the cpufreq governor
API that will be done subsequently.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/cpufreq.c