From patchwork Fri Sep 13 13:00:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 274780 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 891682C0165 for ; Sat, 14 Sep 2013 00:02:56 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932471Ab3IMNJb (ORCPT ); Fri, 13 Sep 2013 09:09:31 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:55807 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932472Ab3IMNJ0 (ORCPT ); Fri, 13 Sep 2013 09:09:26 -0400 Received: by mail-pa0-f51.google.com with SMTP id lf1so2530806pab.10 for ; Fri, 13 Sep 2013 06:09:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=x8ctS/W8bcfVfgMjOf0gGd5ZSt4MWAn6g968lwTkwHY=; b=NHwWFwLkveSG0VEXybNjxnPuERlmSlejF7lxOZvwDAljDLpDpAMbf6xGCHUpkToxIE keSd2VWfpGisdSKW7EId7zdM4yu5bHGnAVtLxF1HzH0LYpYnBlnvxigwvHK6ZB1rnWRI RObrFLKXQrbaTQwWAtl5/dy5nW7jCVbrB/sQkIE7jfxL3YBca2RAEGGVOhSpThmKkhOp GHA4PRehkxVvuGvyG+COu+NcC7LK6JGhJHXAg6imXvGYZ/GE+VWMJJv9dmNBPhhJFi7N eOUgVrhVOhmyP+4qyD+A+cukC8n8yoZmv5yILmq6PRxvKQnAVbWHapPrfcwW12NdrMUq rJvg== X-Gm-Message-State: ALoCoQnsgZYWVBsoKzm7I0ibilyH08jq9GpUkpj2KKtUsLaMb+Qjg8vUvw5Sp/Oz+3yN5K4upfkr X-Received: by 10.68.213.167 with SMTP id nt7mr13425725pbc.140.1379077765634; Fri, 13 Sep 2013 06:09:25 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id oj6sm18014578pab.9.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:09:25 -0700 (PDT) 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, linux-arm-kernel@lists.infradead.org, Viresh Kumar , "David S. Miller" , sparclinux@vger.kernel.org Subject: [PATCH 054/228] cpufreq: sparc: call cpufreq_frequency_table_put_attr() Date: Fri, 13 Sep 2013 18:30:00 +0530 Message-Id: <7baecf8302d921d18afa8fc7447e68e41eb434e8.1379063063.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: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org 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: David S. Miller Cc: sparclinux@vger.kernel.org Signed-off-by: Viresh Kumar Acked-by: David S. Miller --- drivers/cpufreq/sparc-us2e-cpufreq.c | 4 +++- drivers/cpufreq/sparc-us3-cpufreq.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/sparc-us2e-cpufreq.c b/drivers/cpufreq/sparc-us2e-cpufreq.c index e35840d..8db0c18 100644 --- a/drivers/cpufreq/sparc-us2e-cpufreq.c +++ b/drivers/cpufreq/sparc-us2e-cpufreq.c @@ -329,8 +329,10 @@ static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy) static int us2e_freq_cpu_exit(struct cpufreq_policy *policy) { - if (cpufreq_us2e_driver) + if (cpufreq_us2e_driver) { + cpufreq_frequency_table_put_attr(policy->cpu); us2e_set_cpu_divider_index(policy, 0); + } return 0; } diff --git a/drivers/cpufreq/sparc-us3-cpufreq.c b/drivers/cpufreq/sparc-us3-cpufreq.c index 23f2d3b..120a2df 100644 --- a/drivers/cpufreq/sparc-us3-cpufreq.c +++ b/drivers/cpufreq/sparc-us3-cpufreq.c @@ -186,8 +186,10 @@ static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) static int us3_freq_cpu_exit(struct cpufreq_policy *policy) { - if (cpufreq_us3_driver) + if (cpufreq_us3_driver) { + cpufreq_frequency_table_put_attr(policy->cpu); us3_set_cpu_divider_index(policy, 0); + } return 0; }