#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;
}
}
+#ifdef CONFIG_BL_SWITCHER
static int cpufreq_stats_switcher_notifier(struct notifier_block *nfb,
unsigned long action, void *_arg)
{
static struct notifier_block switcher_notifier = {
.notifier_call = cpufreq_stats_switcher_notifier,
};
+#endif
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();
}