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)
commita92604b419f47e1c5098632742d8e031f6e8fab1
treeac817b44523f5d789c11a0e4f6e3be7ce46ea9d0
parent16de72b9f4d07e393bea7b1221898b3be718a296
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