Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758673Ab3HJGse (ORCPT ); Sat, 10 Aug 2013 02:48:34 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:41772 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758659Ab3HJGs2 (ORCPT ); Sat, 10 Aug 2013 02:48:28 -0400 From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Viresh Kumar , Eric Miao Subject: [PATCH 06/44] cpufreq: pxa: call cpufreq_frequency_table_put_attr() Date: Sat, 10 Aug 2013 12:14:02 +0530 Message-Id: <7c7aeda55d9ea8f37de016fd2fd0c78d901082d9.1376116345.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1997 Lines: 62 Drivers which have an exit path must call cpufreq_frequency_table_put_attr() if they have called cpufreq_frequency_table_get_attr() in their init path. This driver was missing this part and is fixed with this patch. Cc: Eric Miao Signed-off-by: Viresh Kumar --- drivers/cpufreq/pxa2xx-cpufreq.c | 6 ++++++ drivers/cpufreq/pxa3xx-cpufreq.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index a429d7c..06af29c 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c @@ -465,10 +465,16 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) return 0; } +static int pxa_cpufreq_exit(struct cpufreq_policy *policy) +{ + cpufreq_frequency_table_put_attr(policy->cpu); +} + static struct cpufreq_driver pxa_cpufreq_driver = { .verify = pxa_verify_policy, .target = pxa_set_target, .init = pxa_cpufreq_init, + .exit = pxa_cpufreq_exit, .get = pxa_cpufreq_get, .name = "PXA2xx", }; diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c index 89841f5..1cc145a 100644 --- a/drivers/cpufreq/pxa3xx-cpufreq.c +++ b/drivers/cpufreq/pxa3xx-cpufreq.c @@ -227,10 +227,16 @@ static int pxa3xx_cpufreq_init(struct cpufreq_policy *policy) return 0; } +static int pxa3xx_cpufreq_exit(struct cpufreq_policy *policy) +{ + cpufreq_frequency_table_put_attr(policy->cpu); +} + static struct cpufreq_driver pxa3xx_cpufreq_driver = { .verify = pxa3xx_cpufreq_verify, .target = pxa3xx_cpufreq_set, .init = pxa3xx_cpufreq_init, + .exit = pxa3xx_cpufreq_exit, .get = pxa3xx_cpufreq_get, .name = "pxa3xx-cpufreq", }; -- 1.7.12.rc2.18.g61b472e -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/