aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Hambleton <mahamble@broadcom.com>2013-11-25 18:54:13 +0000
committerMark Brown <broonie@linaro.org>2013-11-26 11:55:23 +0000
commit83a29e9801d6d52635c9e05b45f89fb86a20022b (patch)
tree86c4fccb544ff09af295294f5d3117d40dee1d96
parent5afafbe8bf6678b37e55aedb86830223d0da23bf (diff)
downloadvexpress-lsk-v3.10/topic/tc2.tar.gz
cpufreq_stats: improve config option isolationv3.10/topic/tc2
Add missing pre-processor protection around calls to IKS APIs Signed-off-by: Mark Hambleton <mahamble@broadcom.com> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--drivers/cpufreq/cpufreq_stats.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index cd98e162a23..7c8d7d3cc53 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -21,7 +21,9 @@
#include <linux/spinlock.h>
#include <linux/notifier.h>
#include <asm/cputime.h>
+#ifdef CONFIG_BL_SWITCHER
#include <asm/bL_switcher.h>
+#endif
static spinlock_t cpufreq_stats_lock;
@@ -424,6 +426,7 @@ static void cpufreq_stats_cleanup(void)
}
}
+#ifdef CONFIG_BL_SWITCHER
static int cpufreq_stats_switcher_notifier(struct notifier_block *nfb,
unsigned long action, void *_arg)
{
@@ -448,6 +451,7 @@ static int cpufreq_stats_switcher_notifier(struct notifier_block *nfb,
static struct notifier_block switcher_notifier = {
.notifier_call = cpufreq_stats_switcher_notifier,
};
+#endif
static int __init cpufreq_stats_init(void)
{
@@ -455,15 +459,18 @@ static int __init cpufreq_stats_init(void)
spin_lock_init(&cpufreq_stats_lock);
ret = cpufreq_stats_setup();
+#ifdef CONFIG_BL_SWITCHER
if (!ret)
bL_switcher_register_notifier(&switcher_notifier);
-
+#endif
return ret;
}
static void __exit cpufreq_stats_exit(void)
{
+#ifdef CONFIG_BL_SWITCHER
bL_switcher_unregister_notifier(&switcher_notifier);
+#endif
cpufreq_stats_cleanup();
}