From a2ef2573cb68e88ca1b0595484cfd2208956d26c Mon Sep 17 00:00:00 2001 From: Johan Rudholm Date: Tue, 11 Oct 2011 14:08:25 +0200 Subject: ux500: pm: Resolve compile error performance.c fails to compile if CONFIG_MMC_BLOCK is not defined, so place the code that depends on the MMC subsystem within #ifdefs. ST-Ericsson ID: 357764 ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: NA Change-Id: Ieb4d560ad1c5089cad2da5ce0f7869dafd1acfe1 Signed-off-by: Johan Rudholm Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33686 Reviewed-by: QABUILD Reviewed-by: Per FORLIN Reviewed-by: Jonas ABERG --- arch/arm/mach-ux500/pm/performance.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-ux500/pm/performance.c b/arch/arm/mach-ux500/pm/performance.c index e919e01614c..ad35f5ad07c 100644 --- a/arch/arm/mach-ux500/pm/performance.c +++ b/arch/arm/mach-ux500/pm/performance.c @@ -46,7 +46,10 @@ */ #define PERF_MMC_RESCAN_CYCLES 10 +#ifdef CONFIG_MMC_BLOCK static struct delayed_work work_mmc; +#endif + static struct delayed_work work_wlan_workaround; static struct pm_qos_request_list wlan_pm_qos_latency; static bool wlan_pm_qos_is_latency_0; @@ -94,6 +97,7 @@ static void wlan_load(struct work_struct *work) msecs_to_jiffies(WLAN_PROBE_DELAY)); } +#ifdef CONFIG_MMC_BLOCK /* * Loop through every CONFIG_MMC_BLOCK_MINORS'th minor device for * MMC_BLOCK_MAJOR, get the struct gendisk for each device. Returns @@ -184,31 +188,37 @@ static void mmc_load(struct work_struct *work) msecs_to_jiffies(PERF_MMC_PROBE_DELAY)); } +#endif /* CONFIG_MMC_BLOCK */ static int __init performance_register(void) { int ret; +#ifdef CONFIG_MMC_BLOCK prcmu_qos_add_requirement(PRCMU_QOS_ARM_OPP, "mmc", 25); - prcmu_qos_add_requirement(PRCMU_QOS_ARM_OPP, "wlan", 25); - INIT_DELAYED_WORK_DEFERRABLE(&work_wlan_workaround, - wlan_load); INIT_DELAYED_WORK_DEFERRABLE(&work_mmc, mmc_load); - ret = schedule_delayed_work(&work_mmc, msecs_to_jiffies(PERF_MMC_PROBE_DELAY)); if (ret) { pr_err("ux500: performance: Fail to schedudle mmc work\n"); goto out; } +#endif + + prcmu_qos_add_requirement(PRCMU_QOS_ARM_OPP, "wlan", 25); + + INIT_DELAYED_WORK_DEFERRABLE(&work_wlan_workaround, + wlan_load); ret = schedule_delayed_work_on(0, &work_wlan_workaround, msecs_to_jiffies(WLAN_PROBE_DELAY)); - if (ret) + if (ret) { pr_err("ux500: performance: Fail to schedudle wlan work\n"); + goto out; + } out: return ret; } -- cgit v1.2.3