From patchwork Fri May 13 21:07:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 783962 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p4DL7fnQ010583 for ; Fri, 13 May 2011 21:07:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759248Ab1EMVHk (ORCPT ); Fri, 13 May 2011 17:07:40 -0400 Received: from na3sys009aog108.obsmtp.com ([74.125.149.199]:55984 "EHLO na3sys009aog108.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759155Ab1EMVHj (ORCPT ); Fri, 13 May 2011 17:07:39 -0400 Received: from mail-yx0-f180.google.com ([209.85.213.180]) (using TLSv1) by na3sys009aob108.postini.com ([74.125.148.12]) with SMTP ID DSNKTc2dmnX8KTvkNt4FoG3Pa13sQBHvNFLK@postini.com; Fri, 13 May 2011 14:07:39 PDT Received: by mail-yx0-f180.google.com with SMTP id 1so1282485yxe.25 for ; Fri, 13 May 2011 14:07:38 -0700 (PDT) Received: by 10.101.189.34 with SMTP id r34mr1229481anp.77.1305320858073; Fri, 13 May 2011 14:07:38 -0700 (PDT) Received: from localhost (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id e9sm1947169ann.24.2011.05.13.14.07.35 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 May 2011 14:07:36 -0700 (PDT) From: Nishanth Menon To: Kevin Hilman Cc: linux-omap , Nishanth Menon Subject: [PM-WIP-CPUFREQ][PATCH 1/5] OMAP2+: cpufreq: free up table on exit Date: Fri, 13 May 2011 14:07:22 -0700 Message-Id: <1305320846-16147-2-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1305320846-16147-1-git-send-email-nm@ti.com> References: <1305320846-16147-1-git-send-email-nm@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 13 May 2011 21:07:41 +0000 (UTC) freq_table allocated by opp_init_cpufreq_table in omap_cpu_init needs to be freed in omap_cpu_exit. Signed-off-by: Nishanth Menon --- arch/arm/mach-omap2/omap2plus-cpufreq.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c index d53ce23..e38ebb8 100644 --- a/arch/arm/mach-omap2/omap2plus-cpufreq.c +++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -216,6 +217,8 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) static int omap_cpu_exit(struct cpufreq_policy *policy) { clk_exit_cpufreq_table(&freq_table); + kfree(freq_table); + freq_table = NULL; clk_put(mpu_clk); return 0; }