Commit 3778ff5c authored by Eduardo Valentin's avatar Eduardo Valentin Committed by Zhang Rui

thermal: cpu cooling: use const parameter while registering

There are predefined cpu_masks that are const data structures.
This patch changes the cpu cooling register function so that
those const cpu_masks can be used, without compilation warnings.

include/linux/cpumask.h

 * The following particular system cpumasks and operations manage
 * possible, present, active and online cpus.
 *
 *     cpu_possible_mask- has bit 'cpu' set iff cpu is populatable
 *     cpu_present_mask - has bit 'cpu' set iff cpu is populated
 *     cpu_online_mask  - has bit 'cpu' set iff cpu available to scheduler
 *     cpu_active_mask  - has bit 'cpu' set iff cpu available to migration
 *
Signed-off-by: default avatarEduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
parent dc1956b5
...@@ -313,7 +313,7 @@ static struct notifier_block thermal_cpufreq_notifier_block = { ...@@ -313,7 +313,7 @@ static struct notifier_block thermal_cpufreq_notifier_block = {
* @clip_cpus: cpumask of cpus where the frequency constraints will happen. * @clip_cpus: cpumask of cpus where the frequency constraints will happen.
*/ */
struct thermal_cooling_device *cpufreq_cooling_register( struct thermal_cooling_device *cpufreq_cooling_register(
struct cpumask *clip_cpus) const struct cpumask *clip_cpus)
{ {
struct thermal_cooling_device *cool_dev; struct thermal_cooling_device *cool_dev;
struct cpufreq_cooling_device *cpufreq_dev = NULL; struct cpufreq_cooling_device *cpufreq_dev = NULL;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
* @clip_cpus: cpumask of cpus where the frequency constraints will happen * @clip_cpus: cpumask of cpus where the frequency constraints will happen
*/ */
struct thermal_cooling_device *cpufreq_cooling_register( struct thermal_cooling_device *cpufreq_cooling_register(
struct cpumask *clip_cpus); const struct cpumask *clip_cpus);
/** /**
* cpufreq_cooling_unregister - function to remove cpufreq cooling device. * cpufreq_cooling_unregister - function to remove cpufreq cooling device.
...@@ -44,7 +44,7 @@ struct thermal_cooling_device *cpufreq_cooling_register( ...@@ -44,7 +44,7 @@ struct thermal_cooling_device *cpufreq_cooling_register(
void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev); void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev);
#else /* !CONFIG_CPU_THERMAL */ #else /* !CONFIG_CPU_THERMAL */
static inline struct thermal_cooling_device *cpufreq_cooling_register( static inline struct thermal_cooling_device *cpufreq_cooling_register(
struct cpumask *clip_cpus) const struct cpumask *clip_cpus)
{ {
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment