summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-08-11 13:38:45 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2017-08-14 07:57:56 -0400
commit1ad35f6e2864d9b52fe9705ede1730468c25f692 (patch)
tree0c06c67e1400c00e9697eef5fd173cd2fdc5bdd9 /drivers/macintosh
parentb3376dcc6c62452fe24e76d8fc35bb13eb7ee178 (diff)
drivers/macintosh: Make wf_control_ops and wf_pid_param const
Make wf_control_ops const as they are only stored in the ops field of a wf_control structure, which is const. Make wf_pid_param const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/windfarm_cpufreq_clamp.c2
-rw-r--r--drivers/macintosh/windfarm_rm31.c4
-rw-r--r--drivers/macintosh/windfarm_smu_controls.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/macintosh/windfarm_cpufreq_clamp.c b/drivers/macintosh/windfarm_cpufreq_clamp.c
index 72d1fdfe02a5..2626990331dc 100644
--- a/drivers/macintosh/windfarm_cpufreq_clamp.c
+++ b/drivers/macintosh/windfarm_cpufreq_clamp.c
@@ -63,7 +63,7 @@ static s32 clamp_max(struct wf_control *ct)
63 return 1; 63 return 1;
64} 64}
65 65
66static struct wf_control_ops clamp_ops = { 66static const struct wf_control_ops clamp_ops = {
67 .set_value = clamp_set, 67 .set_value = clamp_set,
68 .get_value = clamp_get, 68 .get_value = clamp_get,
69 .get_min = clamp_min, 69 .get_min = clamp_min,
diff --git a/drivers/macintosh/windfarm_rm31.c b/drivers/macintosh/windfarm_rm31.c
index bdfcb8a8bfbb..a0cd9c7f9835 100644
--- a/drivers/macintosh/windfarm_rm31.c
+++ b/drivers/macintosh/windfarm_rm31.c
@@ -338,7 +338,7 @@ static int cpu_setup_pid(int cpu)
338} 338}
339 339
340/* Backside/U3 fan */ 340/* Backside/U3 fan */
341static struct wf_pid_param backside_param = { 341static const struct wf_pid_param backside_param = {
342 .interval = 1, 342 .interval = 1,
343 .history_len = 2, 343 .history_len = 2,
344 .gd = 0x00500000, 344 .gd = 0x00500000,
@@ -351,7 +351,7 @@ static struct wf_pid_param backside_param = {
351}; 351};
352 352
353/* DIMMs temperature (clamp the backside fan) */ 353/* DIMMs temperature (clamp the backside fan) */
354static struct wf_pid_param dimms_param = { 354static const struct wf_pid_param dimms_param = {
355 .interval = 1, 355 .interval = 1,
356 .history_len = 20, 356 .history_len = 20,
357 .gd = 0, 357 .gd = 0,
diff --git a/drivers/macintosh/windfarm_smu_controls.c b/drivers/macintosh/windfarm_smu_controls.c
index c155a54e8638..d174c7437337 100644
--- a/drivers/macintosh/windfarm_smu_controls.c
+++ b/drivers/macintosh/windfarm_smu_controls.c
@@ -145,7 +145,7 @@ static s32 smu_fan_max(struct wf_control *ct)
145 return fct->max; 145 return fct->max;
146} 146}
147 147
148static struct wf_control_ops smu_fan_ops = { 148static const struct wf_control_ops smu_fan_ops = {
149 .set_value = smu_fan_set, 149 .set_value = smu_fan_set,
150 .get_value = smu_fan_get, 150 .get_value = smu_fan_get,
151 .get_min = smu_fan_min, 151 .get_min = smu_fan_min,