cpufreq: Add helper to perform alloc/free of policy structure
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Mon, 29 Jul 2013 22:54:11 +0000 (04:24 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 7 Aug 2013 21:02:48 +0000 (23:02 +0200)
commite9698cc5d2749c5b74e137f94a95d7e505b097e8
tree2687d73dd78e85412cec1104b2d6630e987ef921
parent23d328994b548d6822b88fe7e1903652afc354e0
cpufreq: Add helper to perform alloc/free of policy structure

Separate out the allocation of the cpufreq policy structure (along with
its error handling) to a helper function. This makes the code easier to
read and also helps with some upcoming code reorganization.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c