From: 黄涛 Date: Fri, 24 May 2013 08:30:34 +0000 (+0800) Subject: rk3188: cpufreq: fix link error when build without POWER_SUPPLY X-Git-Tag: firefly_0821_release~7040 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=190a33389db3bb05680c5421a36571101b999b83;p=firefly-linux-kernel-4.4.55.git rk3188: cpufreq: fix link error when build without POWER_SUPPLY --- 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) {