summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-04-26 02:28:57 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-04-26 02:28:57 +0200
commitb5ebbcdb53260991a82a8800480dcb06dcffeef9 (patch)
tree03f6008754f381e6d11d44f2dbb1ca09c732a121 /arch/arm
parent02da2d72174c61988eb4456b53f405e3ebdebce4 (diff)
parent5e7c17df795e462c70a43f1b3b670e08efefe8fd (diff)
downloadop-kernel-dev-b5ebbcdb53260991a82a8800480dcb06dcffeef9.zip
op-kernel-dev-b5ebbcdb53260991a82a8800480dcb06dcffeef9.tar.gz
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
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/include/asm/cpuidle.h2
-rw-r--r--arch/arm/kernel/cpuidle.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/include/asm/cpuidle.h b/arch/arm/include/asm/cpuidle.h
index 3848259..baefe1d 100644
--- a/arch/arm/include/asm/cpuidle.h
+++ b/arch/arm/include/asm/cpuidle.h
@@ -36,7 +36,7 @@ struct cpuidle_ops {
struct of_cpuidle_method {
const char *method;
- struct cpuidle_ops *ops;
+ const struct cpuidle_ops *ops;
};
#define CPUIDLE_METHOD_OF_DECLARE(name, _method, _ops) \
diff --git a/arch/arm/kernel/cpuidle.c b/arch/arm/kernel/cpuidle.c
index 703926e..a44b268e 100644
--- a/arch/arm/kernel/cpuidle.c
+++ b/arch/arm/kernel/cpuidle.c
@@ -70,7 +70,7 @@ int arm_cpuidle_suspend(int index)
*
* Returns a struct cpuidle_ops pointer, NULL if not found.
*/
-static struct cpuidle_ops *__init arm_cpuidle_get_ops(const char *method)
+static const struct cpuidle_ops *__init arm_cpuidle_get_ops(const char *method)
{
struct of_cpuidle_method *m = __cpuidle_method_of_table;
@@ -88,7 +88,7 @@ static struct cpuidle_ops *__init arm_cpuidle_get_ops(const char *method)
*
* Get the method name defined in the 'enable-method' property, retrieve the
* associated cpuidle_ops and do a struct copy. This copy is needed because all
- * cpuidle_ops are tagged __initdata and will be unloaded after the init
+ * cpuidle_ops are tagged __initconst and will be unloaded after the init
* process.
*
* 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)
static int __init arm_cpuidle_read_ops(struct device_node *dn, int cpu)
{
const char *enable_method;
- struct cpuidle_ops *ops;
+ const struct cpuidle_ops *ops;
enable_method = of_get_property(dn, "enable-method", NULL);
if (!enable_method)
OpenPOWER on IntegriCloud