From patchwork Sat Aug 10 06:44:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18961 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f197.google.com (mail-ve0-f197.google.com [209.85.128.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 491AE246EB for ; Sat, 10 Aug 2013 06:51:16 +0000 (UTC) Received: by mail-ve0-f197.google.com with SMTP id ox1sf4290334veb.4 for ; Fri, 09 Aug 2013 23:51:16 -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=BjkEFQ9fybvZ9t1ohM1nEG7VBiZHJpcoZCKZWpB1uWs=; b=FylDWbszyZYDdQdJWO6YQ3NJqr1XnoTtUPVQF36L2usfuVR04Y0brdB2NavUqO1lWX bcF4nTjVQ06DxeHkepm0/PHhraLF/2ECWVvGYj38jcl7ENOHwroSvgie9GczkJXD2va7 vUqLeGOUvePbx0TyRbbNy3+iwBjFun1dn8cKSJHWHc5aWZjqHg0bR5uTHaszmw1aPRsq IbG4HhHO0Wc2zHaNiqMCVcHwJxzloOOneb0XNzdhG8k0huCrWOBZP2JsDL0cfBgWnRKT anxR8HkAJrjo7q8PVu5LxLtg+ljve3rYy3pcr4WfqJZcFIXO7dqKDqldxC1iEInEZwKP evyQ== X-Received: by 10.236.38.106 with SMTP id z70mr6632602yha.29.1376117475989; Fri, 09 Aug 2013 23:51:15 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.70 with SMTP id i6ls1723914qei.70.gmail; Fri, 09 Aug 2013 23:51:15 -0700 (PDT) X-Received: by 10.220.114.143 with SMTP id e15mr2268254vcq.95.1376117475887; Fri, 09 Aug 2013 23:51:15 -0700 (PDT) Received: from mail-vc0-f180.google.com (mail-vc0-f180.google.com [209.85.220.180]) by mx.google.com with ESMTPS id x9si5680387vec.80.2013.08.09.23.51.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:51:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.180 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.180; Received: by mail-vc0-f180.google.com with SMTP id gf11so1611144vcb.39 for ; Fri, 09 Aug 2013 23:51:15 -0700 (PDT) X-Gm-Message-State: ALoCoQm1/DX+tQu4MmiNJgM+trCGOB3IpKMGEJqX4Ce1Xg9u5YeGiQxoEP81e3B/eQeL8uCin38w X-Received: by 10.52.117.208 with SMTP id kg16mr6593497vdb.48.1376117475810; Fri, 09 Aug 2013 23:51:15 -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 u4csp193vcz; Fri, 9 Aug 2013 23:51:15 -0700 (PDT) X-Received: by 10.66.25.133 with SMTP id c5mr14884528pag.4.1376117474906; Fri, 09 Aug 2013 23:51:14 -0700 (PDT) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) by mx.google.com with ESMTPS id aq4si14658066pbd.86.2013.08.09.23.51.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:51:14 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.46 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.46; Received: by mail-pa0-f46.google.com with SMTP id fa1so5715338pad.19 for ; Fri, 09 Aug 2013 23:51:14 -0700 (PDT) X-Received: by 10.68.241.198 with SMTP id wk6mr14804086pbc.165.1376117474547; Fri, 09 Aug 2013 23:51:14 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id qv4sm24174232pbc.16.2013.08.09.23.51.11 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 09 Aug 2013 23:51:14 -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 Subject: [PATCH 28/44] cpufreq: pasemi: Use generic cpufreq routines Date: Sat, 10 Aug 2013 12:14:24 +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.220.180 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. Signed-off-by: Viresh Kumar --- drivers/cpufreq/pasemi-cpufreq.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/cpufreq/pasemi-cpufreq.c b/drivers/cpufreq/pasemi-cpufreq.c index 23bc8a82..16f2508 100644 --- a/drivers/cpufreq/pasemi-cpufreq.c +++ b/drivers/cpufreq/pasemi-cpufreq.c @@ -69,11 +69,6 @@ static struct cpufreq_frequency_table pas_freqs[] = { {0, CPUFREQ_TABLE_END}, }; -static struct freq_attr *pas_cpu_freqs_attr[] = { - &cpufreq_freq_attr_scaling_available_freqs, - NULL, -}; - /* * hardware specific functions */ @@ -251,11 +246,6 @@ static int pas_cpufreq_cpu_exit(struct cpufreq_policy *policy) return 0; } -static int pas_cpufreq_verify(struct cpufreq_policy *policy) -{ - return cpufreq_frequency_table_verify(policy, pas_freqs); -} - static int pas_cpufreq_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation) @@ -298,9 +288,9 @@ static struct cpufreq_driver pas_cpufreq_driver = { .flags = CPUFREQ_CONST_LOOPS, .init = pas_cpufreq_cpu_init, .exit = pas_cpufreq_cpu_exit, - .verify = pas_cpufreq_verify, + .verify = cpufreq_generic_frequency_table_verify, .target = pas_cpufreq_target, - .attr = pas_cpu_freqs_attr, + .attr = cpufreq_generic_attr, }; /*