From patchwork Wed May 18 07:37:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 792952 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4I7bqvJ028870 for ; Wed, 18 May 2011 07:37:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754894Ab1ERHhy (ORCPT ); Wed, 18 May 2011 03:37:54 -0400 Received: from na3sys009aog105.obsmtp.com ([74.125.149.75]:38271 "EHLO na3sys009aog105.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754427Ab1ERHhx (ORCPT ); Wed, 18 May 2011 03:37:53 -0400 Received: from mail-yi0-f42.google.com ([209.85.218.42]) (using TLSv1) by na3sys009aob105.postini.com ([74.125.148.12]) with SMTP ID DSNKTdN3UPF3PTkNgT1Dp3mwiMpT257wOWL/@postini.com; Wed, 18 May 2011 00:37:53 PDT Received: by yib12 with SMTP id 12so612160yib.15 for ; Wed, 18 May 2011 00:37:52 -0700 (PDT) Received: by 10.150.115.6 with SMTP id n6mr1201296ybc.43.1305704272258; Wed, 18 May 2011 00:37:52 -0700 (PDT) Received: from localhost (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id p23sm2398596ybc.29.2011.05.18.00.37.50 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 May 2011 00:37:51 -0700 (PDT) From: Nishanth Menon To: kevin Cc: linux-omap , Nishanth Menon Subject: [PM-WIP_CPUFREQ][PATCH 1/6 v2] OMAP2+: cpufreq: free up table on exit Date: Wed, 18 May 2011 02:37:41 -0500 Message-Id: <1305704266-17623-2-git-send-email-nm@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <[PM-WIP_CPUFREQ][PATCH 0/5] Cleanups for cpufreq> References: <[PM-WIP_CPUFREQ][PATCH 0/5] Cleanups for cpufreq> 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 (demeter2.kernel.org [140.211.167.43]); Wed, 18 May 2011 07:37:55 +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; }