From patchwork Wed Aug 21 14:42:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19384 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 93651248E6 for ; Wed, 21 Aug 2013 14:43:42 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id l109sf503161yhq.3 for ; Wed, 21 Aug 2013 07:43:42 -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=zLv6P/WyHIdSIvgF4TjPNNuRc+2NUbSZjahGoYOyc5w=; b=lYIlGrey++ymHen/jeRKMr4SvVhNUtx3Uhh116E5ZF8rHX4pDHHJq4kiRHJRHm1Jfr f9WlOZP/VdAA5+M7UJ3DWT1/vHmJehe8u1XLwukeNTBlJl9qsMELagX6PYEN9YK5Y1T1 GgrdjxIamtyKoTLowwBve7CrntJjFpDvRRWei1sGtRmVm60luNWOUf7bCrSPImHJzg65 dPsnzMGFxStl9rNvKpZLzBz+OP4FiAUX/FXGTJIzxwcQy3UcCu01J1mOzZxW53t0FNcN qfFL3WiJ6M+RLFbUZN8fYbOwINCRIeg/0RVQtNRfdnqpNa0MAMSb7uPp8hgirjDv0ah9 xUlg== X-Received: by 10.236.142.38 with SMTP id h26mr614643yhj.57.1377096222394; Wed, 21 Aug 2013 07:43:42 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.30.1 with SMTP id o1ls630553qeh.3.gmail; Wed, 21 Aug 2013 07:43:42 -0700 (PDT) X-Received: by 10.52.24.4 with SMTP id q4mr5514016vdf.6.1377096222071; Wed, 21 Aug 2013 07:43:42 -0700 (PDT) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id gn1si2219934vec.67.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:43:42 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.50 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.50; Received: by mail-vb0-f50.google.com with SMTP id x14so361672vbb.23 for ; Wed, 21 Aug 2013 07:43:42 -0700 (PDT) X-Gm-Message-State: ALoCoQnl1RyUJL3huMGDtWcWTrIYCIFj2Pwk2kEAwOFmTR6KBt6l8YBmEptuzXUA1lchFzFb+Bco X-Received: by 10.52.120.7 with SMTP id ky7mr5714271vdb.12.1377096221981; Wed, 21 Aug 2013 07:43:41 -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 u4csp224580vcz; Wed, 21 Aug 2013 07:43:41 -0700 (PDT) X-Received: by 10.68.111.197 with SMTP id ik5mr44477pbb.171.1377096220967; Wed, 21 Aug 2013 07:43:40 -0700 (PDT) Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) by mx.google.com with ESMTPS id qh6si6711985pac.105.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:43:40 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.171 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.171; Received: by mail-pd0-f171.google.com with SMTP id g10so505044pdj.2 for ; Wed, 21 Aug 2013 07:43:40 -0700 (PDT) X-Received: by 10.68.252.68 with SMTP id zq4mr8046526pbc.49.1377096220573; Wed, 21 Aug 2013 07:43:40 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id os4sm8817995pbb.25.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:43:39 -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 08/14] cpufreq: pasemi: use cpufreq_generic_init() routine Date: Wed, 21 Aug 2013 20:12:27 +0530 Message-Id: <8a509e8c318a77779f8fef0e1c88a44a4b912a2a.1377093938.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.50 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 4d69958..1c33136 100644 --- a/drivers/cpufreq/pasemi-cpufreq.c +++ b/drivers/cpufreq/pasemi-cpufreq.c @@ -202,20 +202,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);