From a4d580a70587d7eacf7e119246a871b158341d8a Mon Sep 17 00:00:00 2001 From: Grazvydas Ignotas Date: Sun, 29 May 2016 00:20:50 +0300 Subject: [PATCH] OMAP2: PM debug: always compile The stats are always collected anyway, so make them accessible without CONFIG_PM_DEBUG. --- arch/arm/mach-omap2/Makefile | 2 +- arch/arm/mach-omap2/pm-debug.c | 9 ++++++++- arch/arm/mach-omap2/pm.h | 4 ---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index d904d318e73c..43075a1d0ead 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile @@ -63,7 +63,7 @@ obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o \ cpuidle34xx.o obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o -obj-$(CONFIG_PM_DEBUG) += pm-debug.o +obj-y += pm-debug.o obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 814bcd901596..dcb53305e255 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c @@ -60,6 +60,7 @@ static const char pwrdm_state_names[][PWRDM_MAX_PWRSTS] = { "ON" }; +#ifdef CONFIG_PM_DEBUG void pm_dbg_update_time(struct powerdomain *pwrdm, int prev) { s64 t; @@ -74,6 +75,7 @@ void pm_dbg_update_time(struct powerdomain *pwrdm, int prev) pwrdm->timer = t; } +#endif static int clkdm_dbg_show_counter(struct clockdomain *clkdm, void *user) { @@ -124,6 +126,7 @@ static int pwrdm_dbg_show_counter(struct powerdomain *pwrdm, void *user) static int pwrdm_dbg_show_timer(struct powerdomain *pwrdm, void *user) { +#ifdef CONFIG_PM_DEBUG struct seq_file *s = (struct seq_file *)user; int i; @@ -142,6 +145,7 @@ static int pwrdm_dbg_show_timer(struct powerdomain *pwrdm, void *user) pwrdm->state_timer[i]); seq_printf(s, "\n"); +#endif return 0; } @@ -205,9 +209,11 @@ DEFINE_SIMPLE_ATTRIBUTE(pwrdm_suspend_fops, pwrdm_suspend_get, static int __init pwrdms_setup(struct powerdomain *pwrdm, void *dir) { + struct dentry *d; + +#ifdef CONFIG_PM_DEBUG int i; s64 t; - struct dentry *d; t = sched_clock(); @@ -215,6 +221,7 @@ static int __init pwrdms_setup(struct powerdomain *pwrdm, void *dir) pwrdm->state_timer[i] = 0; pwrdm->timer = t; +#endif if (strncmp(pwrdm->name, "dpll", 4) == 0) return 0; diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h index eac6fce87f1a..dc9e8369dd31 100644 --- a/arch/arm/mach-omap2/pm.h +++ b/arch/arm/mach-omap2/pm.h @@ -59,11 +59,7 @@ inline void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params) extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm); extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state); -#ifdef CONFIG_PM_DEBUG extern u32 enable_off_mode; -#else -#define enable_off_mode 0 -#endif #if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev); -- 2.39.2