From: Zachary Amsden Subject: [PATCH] cpufreq: Make cpufreq_get always defined Date: Fri, 9 Oct 2009 16:26:07 -1000 Message-ID: <1255141569-3572-1-git-send-email-zamsden@redhat.com> References: <4ACFA178.2040203@web.de> Cc: Zachary Amsden To: kvm@vger.kernel.org, avi@redhat.com Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58568 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933898AbZJJC3F (ORCPT ); Fri, 9 Oct 2009 22:29:05 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9A2Sd2s010054 for ; Fri, 9 Oct 2009 22:28:39 -0400 In-Reply-To: <4ACFA178.2040203@web.de> CC: linux-kernel@kernel.vger.org CC: torvalds@linux-foundation.org CC: Dave Jones CC: cpufreq@vger.kernel.org Sender: kvm-owner@vger.kernel.org List-ID: Even if not using cpufreq, there is little justification for exporting cpufreq_quick_get and not cpufreq_get, especially when it is so easy and harmless to do. Signed-off-by: Zachary Amsden diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 44717eb..684fc4b 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -291,17 +291,22 @@ struct global_attr { int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); int cpufreq_update_policy(unsigned int cpu); -/* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ -unsigned int cpufreq_get(unsigned int cpu); - -/* query the last known CPU freq (in kHz). If zero, cpufreq couldn't detect it */ #ifdef CONFIG_CPU_FREQ +/* query the last known CPU freq (in kHz). If zero, cpufreq doesn't know it */ unsigned int cpufreq_quick_get(unsigned int cpu); + +/* query the current CPU frequency (in kHz). If zero, cpufreq doesn't know it */ +unsigned int cpufreq_get(unsigned int cpu); #else static inline unsigned int cpufreq_quick_get(unsigned int cpu) { return 0; } + +static inline unsigned int cpufreq_get(unsigned int cpu) +{ + return 0; +} #endif