aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-04-25 20:28:57 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-04-25 20:28:57 -0400
commitb5ebbcdb53260991a82a8800480dcb06dcffeef9 (patch)
tree03f6008754f381e6d11d44f2dbb1ca09c732a121
parent02da2d72174c61988eb4456b53f405e3ebdebce4 (diff)
parent5e7c17df795e462c70a43f1b3b670e08efefe8fd (diff)
Merge branch 'cpuidle/4.7' of http://git.linaro.org/people/daniel.lezcano/linux into tmp
Pull ARM cpuidle changes for v4.7 from Daniel Lezcano. * 'cpuidle/4.7' of http://git.linaro.org/people/daniel.lezcano/linux: drivers: firmware: psci: use const and __initconst for psci_cpuidle_ops soc: qcom: spm: Use const and __initconst for qcom_cpuidle_ops ARM: cpuidle: constify return value of arm_cpuidle_get_ops() ARM: cpuidle: add const qualifier to cpuidle_ops member in structures
-rw-r--r--arch/arm/include/asm/cpuidle.h2
-rw-r--r--arch/arm/kernel/cpuidle.c6
-rw-r--r--drivers/firmware/psci.c2
-rw-r--r--drivers/soc/qcom/spm.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h
index 3848259bebf8..baefe1d51517 100644
--- a/arch/arm/include/asm/cpuidle.h
+++ b/arch/arm/include/asm/cpuidle.h
@@ -36,7 +36,7 @@ struct cpuidle_ops {
36 36
37struct of_cpuidle_method { 37struct of_cpuidle_method {
38 const char *method; 38 const char *method;
39 struct cpuidle_ops *ops; 39 const struct cpuidle_ops *ops;
40}; 40};
41 41
42#define CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops) \ 42#define CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops) \
diff --git a/arch/arm/kernel/cpuidle.c b/arch/arm/kernel/cpuidle.c
index 703926e7007b..a44b268e12e1 100644
--- a/arch/arm/kernel/cpuidle.c
+++ b/arch/arm/kernel/cpuidle.c
@@ -70,7 +70,7 @@ int arm_cpuidle_suspend(int index)
70 * 70 *
71 * Returns a struct cpuidle_ops pointer, NULL if not found. 71 * Returns a struct cpuidle_ops pointer, NULL if not found.
72 */ 72 */
73static struct cpuidle_ops *__init arm_cpuidle_get_ops(const char *method) 73static const struct cpuidle_ops *__init arm_cpuidle_get_ops(const char *method)
74{ 74{
75 struct of_cpuidle_method *m = __cpuidle_method_of_table; 75 struct of_cpuidle_method *m = __cpuidle_method_of_table;
76 76
@@ -88,7 +88,7 @@ static struct cpuidle_ops *__init arm_cpuidle_get_ops(const char *method)
88 * 88 *
89 * Get the method name defined in the 'enable-method' property, retrieve the 89 * Get the method name defined in the 'enable-method' property, retrieve the
90 * associated cpuidle_ops and do a struct copy. This copy is needed because all 90 * associated cpuidle_ops and do a struct copy. This copy is needed because all
91 * cpuidle_ops are tagged __initdata and will be unloaded after the init 91 * cpuidle_ops are tagged __initconst and will be unloaded after the init
92 * process. 92 * process.
93 * 93 *
94 * Return 0 on sucess, -ENOENT if no 'enable-method' is defined, -EOPNOTSUPP if 94 * Return 0 on sucess, -ENOENT if no 'enable-method' is defined, -EOPNOTSUPP if
@@ -97,7 +97,7 @@ static struct cpuidle_ops *__init arm_cpuidle_get_ops(const char *method)
97static int __init arm_cpuidle_read_ops(struct device_node *dn, int cpu) 97static int __init arm_cpuidle_read_ops(struct device_node *dn, int cpu)
98{ 98{
99 const char *enable_method; 99 const char *enable_method;
100 struct cpuidle_ops *ops; 100 const struct cpuidle_ops *ops;
101 101
102 enable_method = of_get_property(dn, "enable-method", NULL); 102 enable_method = of_get_property(dn, "enable-method", NULL);
103 if (!enable_method) 103 if (!enable_method)
diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index 11bfee8b79a9..eb8134a148c0 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -355,7 +355,7 @@ int psci_cpu_suspend_enter(unsigned long index)
355 355
356/* ARM specific CPU idle operations */ 356/* ARM specific CPU idle operations */
357#ifdef CONFIG_ARM 357#ifdef CONFIG_ARM
358static struct cpuidle_ops psci_cpuidle_ops __initdata = { 358static const struct cpuidle_ops psci_cpuidle_ops __initconst = {
359 .suspend = psci_cpu_suspend_enter, 359 .suspend = psci_cpu_suspend_enter,
360 .init = psci_dt_cpu_init_idle, 360 .init = psci_dt_cpu_init_idle,
361}; 361};
diff --git a/drivers/soc/qcom/spm.c b/drivers/soc/qcom/spm.c
index 5548a31e1a39..1fcbb22a4a1c 100644
--- a/drivers/soc/qcom/spm.c
+++ b/drivers/soc/qcom/spm.c
@@ -274,7 +274,7 @@ check_spm:
274 return per_cpu(cpu_spm_drv, cpu) ? 0 : -ENXIO; 274 return per_cpu(cpu_spm_drv, cpu) ? 0 : -ENXIO;
275} 275}
276 276
277static struct cpuidle_ops qcom_cpuidle_ops __initdata = { 277static const struct cpuidle_ops qcom_cpuidle_ops __initconst = {
278 .suspend = qcom_idle_enter, 278 .suspend = qcom_idle_enter,
279 .init = qcom_cpuidle_init, 279 .init = qcom_cpuidle_init,
280}; 280};