rk3188: cpufreq: fix link error when build without POWER_SUPPLY
author黄涛 <huangtao@rock-chips.com>
Fri, 24 May 2013 08:30:34 +0000 (16:30 +0800)
committer黄涛 <huangtao@rock-chips.com>
Fri, 24 May 2013 08:30:34 +0000 (16:30 +0800)
arch/arm/mach-rk3188/cpufreq.c

index c9ca913b3af348be29fa40895406ced66ce1611d..12a41f312e2704a027c3e6416686dbc5c6bc2b81 100644 (file)
@@ -466,7 +466,11 @@ static struct freq_attr *rk3188_cpufreq_attr[] = {
        NULL,
 };
 
+#ifdef CONFIG_POWER_SUPPLY
 extern int rk_get_system_battery_capacity(void);
+#else
+static int rk_get_system_battery_capacity(void) { return 100; }
+#endif
 
 static unsigned int cpufreq_scale_limit(unsigned int target_freq, struct cpufreq_policy *policy, bool is_private)
 {