From patchwork Sat Oct 10 02:26:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zachary Amsden X-Patchwork-Id: 52901 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9A2UMbQ001709 for ; Sat, 10 Oct 2009 02:30:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934742AbZJJC3G (ORCPT ); Fri, 9 Oct 2009 22:29:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934741AbZJJC3G (ORCPT ); Fri, 9 Oct 2009 22:29:06 -0400 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 Received: from localhost.localdomain (vpn-12-47.rdu.redhat.com [10.11.12.47]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9A2SaxA009209; Fri, 9 Oct 2009 22:28:37 -0400 From: Zachary Amsden To: kvm@vger.kernel.org, avi@redhat.com Cc: 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> In-Reply-To: <4ACFA178.2040203@web.de> References: <4ACFA178.2040203@web.de> CC: linux-kernel@kernel.vger.org CC: torvalds@linux-foundation.org CC: Dave Jones CC: cpufreq@vger.kernel.org X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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