From patchwork Fri Sep 13 13:00:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20125 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f70.google.com (mail-vb0-f70.google.com [209.85.212.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2485720358 for ; Fri, 13 Sep 2013 13:11:29 +0000 (UTC) Received: by mail-vb0-f70.google.com with SMTP id h10sf1190907vbh.5 for ; Fri, 13 Sep 2013 06:11:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version: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=GFvNHvW5JG77+lcgV5v3+LyzngihYSWmKjuGk5Ch2Qc=; b=ZXCEGS8yubeE8Yi9eaFg1O+5I75OahPQ2j5aYe4HIhr4wPpWDDewWGQyJQP57z8j+A QdfadLZapz/tWHReDsXC+Sdw/yH72PL9BDliJ9QE5R7sF8Ls4AwfWkpJgq3EDGol4DRD +kkOC+uYyIXILLycuA2oPeDeOC88xu8EYZ3DxwT0aTQtXCzT6zh5QxgZtSDg/akyL21G KfzZFUmMcrV+dJoWV/CjWTHJ6N0TVvd/5KnKYQyI5i8IsheXFmffTFMXxgmWWwCK3TLs u4akH/MhKfgb4t8QgYaYemvUAkICHTWcMJIBjYZYdgfTEdAL2vpiTT8PnQgrnsg9/b09 s8Mg== X-Gm-Message-State: ALoCoQm+6VrDIG+5prUQ+jjs/dRslUZq4wLn/Prjd5LWmifxGBAVWgMxz8PgcJx907EZ0iMC5ZCh X-Received: by 10.236.7.130 with SMTP id 2mr5113889yhp.4.1379077888899; Fri, 13 Sep 2013 06:11:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.58.148 with SMTP id r20ls1184968qeq.3.gmail; Fri, 13 Sep 2013 06:11:28 -0700 (PDT) X-Received: by 10.221.44.136 with SMTP id ug8mr11934901vcb.13.1379077888682; Fri, 13 Sep 2013 06:11:28 -0700 (PDT) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id gq6si3099884veb.91.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11:28 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.52 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.52; Received: by mail-vb0-f52.google.com with SMTP id f12so899920vbg.11 for ; Fri, 13 Sep 2013 06:11:28 -0700 (PDT) X-Received: by 10.58.161.116 with SMTP id xr20mr11940627veb.2.1379077888593; Fri, 13 Sep 2013 06:11:28 -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 u4csp79872vcz; Fri, 13 Sep 2013 06:11:27 -0700 (PDT) X-Received: by 10.67.4.136 with SMTP id ce8mr8652129pad.158.1379077886991; Fri, 13 Sep 2013 06:11:26 -0700 (PDT) Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) by mx.google.com with ESMTPS id ul8si7424325pbc.147.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11:26 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.42 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.42; Received: by mail-pb0-f42.google.com with SMTP id un15so1230724pbc.1 for ; Fri, 13 Sep 2013 06:11:26 -0700 (PDT) X-Received: by 10.66.118.204 with SMTP id ko12mr1616791pab.184.1379077886603; Fri, 13 Sep 2013 06:11:26 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id os4sm11677221pbb.25.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:11: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 , John Crispin Subject: [PATCH 071/228] cpufreq: loongson2: Use generic cpufreq routines Date: Fri, 13 Sep 2013 18:30:17 +0530 Message-Id: <55bbc7474119455d56c523b25802984b9dab2b19.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: 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.52 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: , Most of the CPUFreq drivers do similar things in .exit() and .verify() routines and .attr. So its better if we have generic routines for them which can be used by cpufreq drivers then. This patch uses these generic routines for this driver. Cc: John Crispin Signed-off-by: Viresh Kumar --- drivers/cpufreq/loongson2_cpufreq.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/cpufreq/loongson2_cpufreq.c b/drivers/cpufreq/loongson2_cpufreq.c index cec4e72..ed7fbe2 100644 --- a/drivers/cpufreq/loongson2_cpufreq.c +++ b/drivers/cpufreq/loongson2_cpufreq.c @@ -137,12 +137,6 @@ static int loongson2_cpufreq_cpu_init(struct cpufreq_policy *policy) &loongson2_clockmod_table[0]); } -static int loongson2_cpufreq_verify(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, - &loongson2_clockmod_table[0]); -} - static int loongson2_cpufreq_exit(struct cpufreq_policy *policy) { cpufreq_frequency_table_put_attr(policy->cpu); @@ -150,19 +144,14 @@ static int loongson2_cpufreq_exit(struct cpufreq_policy *policy) return 0; } -static struct freq_attr *loongson2_table_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - static struct cpufreq_driver loongson2_cpufreq_driver = { .name = "loongson2", .init = loongson2_cpufreq_cpu_init, - .verify = loongson2_cpufreq_verify, + .verify = cpufreq_generic_frequency_table_verify, .target = loongson2_cpufreq_target, .get = loongson2_cpufreq_get, .exit = loongson2_cpufreq_exit, - .attr = loongson2_table_attr, + .attr = cpufreq_generic_attr, }; static struct platform_device_id platform_device_ids[] = {