summaryrefslogtreecommitdiff
path: root/drivers/cpuidle
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpuidle')
-rw-r--r--drivers/cpuidle/cpuidle-arm.c1
-rw-r--r--drivers/cpuidle/lpm-levels.c10
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/cpuidle/cpuidle-arm.c b/drivers/cpuidle/cpuidle-arm.c
index e342565e8715..1855b9ee807f 100644
--- a/drivers/cpuidle/cpuidle-arm.c
+++ b/drivers/cpuidle/cpuidle-arm.c
@@ -135,6 +135,7 @@ static int __init arm_idle_init(void)
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (!dev) {
pr_err("Failed to allocate cpuidle device\n");
+ ret = -ENOMEM;
goto out_fail;
}
dev->cpu = cpu;
diff --git a/drivers/cpuidle/lpm-levels.c b/drivers/cpuidle/lpm-levels.c
index 823b7d988284..d8e571981c35 100644
--- a/drivers/cpuidle/lpm-levels.c
+++ b/drivers/cpuidle/lpm-levels.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
* Copyright (C) 2006-2007 Adam Belay <abelay@novell.com>
* Copyright (C) 2009 Intel Corporation
*
@@ -36,6 +36,7 @@
#include <linux/moduleparam.h>
#include <linux/sched.h>
#include <linux/cpu_pm.h>
+#include <linux/arm-smccc.h>
#include <soc/qcom/spm.h>
#include <soc/qcom/pm.h>
#include <soc/qcom/rpm-notifier.h>
@@ -161,13 +162,13 @@ s32 msm_cpuidle_get_deep_idle_latency(void)
void lpm_suspend_wake_time(uint64_t wakeup_time)
{
if (wakeup_time <= 0) {
- suspend_wake_time = msm_pm_sleep_time_override;
+ suspend_wake_time = msm_pm_sleep_time_override * MSEC_PER_SEC;
return;
}
if (msm_pm_sleep_time_override &&
(msm_pm_sleep_time_override < wakeup_time))
- suspend_wake_time = msm_pm_sleep_time_override;
+ suspend_wake_time = msm_pm_sleep_time_override * MSEC_PER_SEC;
else
suspend_wake_time = wakeup_time;
}
@@ -793,7 +794,7 @@ static uint64_t get_cluster_sleep_time(struct lpm_cluster *cluster,
if (!suspend_wake_time)
return ~0ULL;
else
- return USEC_PER_SEC * suspend_wake_time;
+ return USEC_PER_MSEC * suspend_wake_time;
}
cpumask_and(&online_cpus_in_cluster,
@@ -1412,7 +1413,6 @@ unlock_and_return:
}
#if !defined(CONFIG_CPU_V7)
-asmlinkage int __invoke_psci_fn_smc(u64, u64, u64, u64);
bool psci_enter_sleep(struct lpm_cluster *cluster, int idx, bool from_idle)
{
/*