From patchwork Sat Aug 10 06:44:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18940 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8BE9A246EB for ; Sat, 10 Aug 2013 06:48:36 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id z20sf5835577yhz.11 for ; Fri, 09 Aug 2013 23:48:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=x8ctS/W8bcfVfgMjOf0gGd5ZSt4MWAn6g968lwTkwHY=; b=W80MU51HPsvglTgcTuYrAchwNGdMlqBbP4PgPHcoadPF3gHCySbzi5TcUx+Q1IvgN3 5rUB1fOVy6VYb94s8vgFQG++Kvd5HBbH9xqL1zYC6GDQH/0i0i90+rNfTB4muOvfU/hk cSvgC1hMCPBQi9uKxCVJ6ESbWDoYwFh9OdoPvAsj6ojLHum3RYAniEeegcHS5ye39gG1 shzA+tunZYsGSFLdeFlbvcD+EbaFhF59pkMg+wy0yMGKzzWQjkEtvnLFZVfFpw/NcBcy 7M2oR9QqrvwhosMmGuwHTV4Wb13kDg4mj1ngSnwaNo2j5RdjUVom57w9H/DvzRXc0n8z US9A== X-Received: by 10.224.173.4 with SMTP id n4mr13370883qaz.3.1376117316280; Fri, 09 Aug 2013 23:48:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.73.234 with SMTP id o10ls1755444qev.24.gmail; Fri, 09 Aug 2013 23:48:36 -0700 (PDT) X-Received: by 10.58.209.5 with SMTP id mi5mr2142104vec.46.1376117316179; Fri, 09 Aug 2013 23:48:36 -0700 (PDT) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by mx.google.com with ESMTPS id se5si5668587vdc.153.2013.08.09.23.48.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:48:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.43; Received: by mail-vb0-f43.google.com with SMTP id h11so4659412vbh.16 for ; Fri, 09 Aug 2013 23:48:36 -0700 (PDT) X-Gm-Message-State: ALoCoQl5ZIkrESMBD2LfIUSHas3Zpqmf+2E+XQZ0l8NE+ciw03nnhXJNUEIvLq8Pl6arUsBxpvaX X-Received: by 10.58.211.227 with SMTP id nf3mr2216631vec.20.1376117316069; Fri, 09 Aug 2013 23:48:36 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp103vcz; Fri, 9 Aug 2013 23:48:35 -0700 (PDT) X-Received: by 10.66.229.106 with SMTP id sp10mr15088245pac.117.1376117315066; Fri, 09 Aug 2013 23:48:35 -0700 (PDT) Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by mx.google.com with ESMTPS id gk2si14603641pbb.289.2013.08.09.23.48.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:48:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.173 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.173; Received: by mail-pd0-f173.google.com with SMTP id p10so1386817pdj.18 for ; Fri, 09 Aug 2013 23:48:34 -0700 (PDT) X-Received: by 10.68.12.165 with SMTP id z5mr14716421pbb.172.1376117314663; Fri, 09 Aug 2013 23:48:34 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id qv4sm24161244pbc.16.2013.08.09.23.48.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:48:34 -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, Viresh Kumar , "David S. Miller" , sparclinux@vger.kernel.org Subject: [PATCH 07/44] cpufreq: sparc: call cpufreq_frequency_table_put_attr() Date: Sat, 10 Aug 2013 12:14:03 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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; }