From patchwork Fri Sep 13 13:01:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20193 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f71.google.com (mail-qe0-f71.google.com [209.85.128.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 30B0D20358 for ; Fri, 13 Sep 2013 13:19:29 +0000 (UTC) Received: by mail-qe0-f71.google.com with SMTP id a11sf1225626qen.6 for ; Fri, 13 Sep 2013 06:19:29 -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=X6FtrOo+K8+1QnPbNbcQ9B27oYtnzbWidmhcL8M9d2o=; b=B0QITqBj3XlVO7doBzi5fQ2EooWhgzmLgL623QtnE+8t+UQ1+b5nDDcfsamURkG4WJ CS9pLWdTRK8n1p82ehNrE//ZynO5WqBLzYk3y2g+hwPGPYJTHxrP4vIULGesDCsst3wV RU2Ytf8eYR8uqIkZahBbd69xX0l4CUUaWnPS2socSP2/q2NEC4HEIzx5mDnCp6itcXeZ Xnyvi66l2Soxpc1UjocY66LPB/niWL5ekxl4oV9+8xBcwGsC7qYHdsu5cOf8eJkcqcH5 YJIDi1Qg6setRqP8NwTNmXXj0At+AL5Y7YeX92LsXi28/sndMpv2JzPUS5wF8PC1powh CBnQ== X-Gm-Message-State: ALoCoQktcA9AAKipdgTOFcnQ69k5s3mrD8kUgVAm5KezgSaBm5i9At7xk8jptH4IjThVa1QvxtEw X-Received: by 10.236.45.102 with SMTP id o66mr5096426yhb.47.1379078369015; Fri, 13 Sep 2013 06:19:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.116.135 with SMTP id jw7ls1108476qeb.58.gmail; Fri, 13 Sep 2013 06:19:28 -0700 (PDT) X-Received: by 10.58.67.101 with SMTP id m5mr778981vet.29.1379078368798; Fri, 13 Sep 2013 06:19:28 -0700 (PDT) Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by mx.google.com with ESMTPS id ed9si3113172vcb.81.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:19:28 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.49 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.49; Received: by mail-vb0-f49.google.com with SMTP id w16so866720vbb.36 for ; Fri, 13 Sep 2013 06:19:28 -0700 (PDT) X-Received: by 10.52.157.134 with SMTP id wm6mr5864785vdb.26.1379078368730; Fri, 13 Sep 2013 06:19: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 u4csp80267vcz; Fri, 13 Sep 2013 06:19:28 -0700 (PDT) X-Received: by 10.68.76.34 with SMTP id h2mr13562887pbw.20.1379078367795; Fri, 13 Sep 2013 06:19:27 -0700 (PDT) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by mx.google.com with ESMTPS id g6si11239575pav.63.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:19:27 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.50 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.50; Received: by mail-pa0-f50.google.com with SMTP id fb10so2505107pad.23 for ; Fri, 13 Sep 2013 06:19:27 -0700 (PDT) X-Received: by 10.68.236.168 with SMTP id uv8mr13549670pbc.124.1379078367320; Fri, 13 Sep 2013 06:19:27 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id bt1sm11750874pbb.2.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:19:26 -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 Subject: [PATCH 139/228] cpufreq: pasemi: use cpufreq_generic_init() routine Date: Fri, 13 Sep 2013 18:31:25 +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.49 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: , Use generic cpufreq_generic_init() routine instead of replicating the same code here. Signed-off-by: Viresh Kumar --- drivers/cpufreq/pasemi-cpufreq.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/cpufreq/pasemi-cpufreq.c b/drivers/cpufreq/pasemi-cpufreq.c index 16f2508..1cca332 100644 --- a/drivers/cpufreq/pasemi-cpufreq.c +++ b/drivers/cpufreq/pasemi-cpufreq.c @@ -204,20 +204,13 @@ static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy) pr_debug("%d: %d\n", i, pas_freqs[i].frequency); } - policy->cpuinfo.transition_latency = get_gizmo_latency(); - cur_astate = get_cur_astate(policy->cpu); pr_debug("current astate is at %d\n",cur_astate); policy->cur = pas_freqs[cur_astate].frequency; - cpumask_copy(policy->cpus, cpu_online_mask); - ppc_proc_freq = policy->cur * 1000ul; - /* this ensures that policy->cpuinfo_min and policy->cpuinfo_max - * are set correctly - */ - return cpufreq_table_validate_and_show(policy, pas_freqs); + return cpufreq_generic_init(policy, pas_freqs, get_gizmo_latency()); out_unmap_sdcpwr: iounmap(sdcpwr_mapbase);