From: Zachary Amsden Subject: [PATCH] kvm-kmod cpufreq_get fix Date: Fri, 9 Oct 2009 16:26:09 -1000 Message-ID: <1255141569-3572-3-git-send-email-zamsden@redhat.com> References: <4ACFA178.2040203@web.de> <1255141569-3572-1-git-send-email-zamsden@redhat.com> <1255141569-3572-2-git-send-email-zamsden@redhat.com> Cc: Zachary Amsden To: kvm@vger.kernel.org, avi@redhat.com Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1025 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964840AbZJJC3R (ORCPT ); Fri, 9 Oct 2009 22:29:17 -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 n9A2Sp8d029171 for ; Fri, 9 Oct 2009 22:28:51 -0400 In-Reply-To: <1255141569-3572-2-git-send-email-zamsden@redhat.com> CC: Eduardo Habkost Sender: kvm-owner@vger.kernel.org List-ID: Define cpufreq_get for kernels which don't export it when not config'd. Signed-off-by: Zachary Amsden diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h index 47fdc86..6fe7d87 100644 --- a/external-module-compat-comm.h +++ b/external-module-compat-comm.h @@ -993,3 +993,12 @@ unsigned long kvm_vma_kernel_pagesize(struct vm_area_struct *vma) } \ }) #endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33) +#ifndef CONFIG_CPU_FREQ +static inline unsigned int cpufreq_get(unsigned int cpu) +{ + return 0; +} +#endif +#endif