From 190a33389db3bb05680c5421a36571101b999b83 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Fri, 24 May 2013 16:30:34 +0800 Subject: [PATCH] rk3188: cpufreq: fix link error when build without POWER_SUPPLY --- arch/arm/mach-rk3188/cpufreq.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/mach-rk3188/cpufreq.c b/arch/arm/mach-rk3188/cpufreq.c index c9ca913b3af3..12a41f312e27 100644 --- a/arch/arm/mach-rk3188/cpufreq.c +++ b/arch/arm/mach-rk3188/cpufreq.c @@ -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) { -- 2.34.1