]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
cpufreq: allow driver-specific data
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 19 Oct 2014 09:30:27 +0000 (11:30 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 20 Oct 2014 22:51:01 +0000 (00:51 +0200)
commit51315cdfa0521fff3059cec5fb8ffecc7f37cba7
treede84c1bf01703c640086afc019cdef697fe143b1
parentf114040e3ea6e07372334ade75d1ee0775c355e1
cpufreq: allow driver-specific data

This commit extends the cpufreq_driver structure with an additional
'void *driver_data' field that can be filled by the ->probe() function
of a cpufreq driver to pass additional custom information to the
driver itself.

A new function called cpufreq_get_driver_data() is added to allow a
cpufreq driver to retrieve those driver data, since they are typically
needed from a cpufreq_policy->init() callback, which does not have
access to the cpufreq_driver structure. This function call is similar
to the existing cpufreq_get_current_driver() function call.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c
include/linux/cpufreq.h