From patchwork Wed Aug 21 14:42:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 19389 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f198.google.com (mail-ve0-f198.google.com [209.85.128.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CDA45248E6 for ; Wed, 21 Aug 2013 14:44:17 +0000 (UTC) Received: by mail-ve0-f198.google.com with SMTP id 15sf499124vea.5 for ; Wed, 21 Aug 2013 07:44:17 -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=WEAODJLgizAyNY7vHHjJJ8kE9wcIna9XN9tlogaK2Kg=; b=JKcwixYLVE389Cogt2L28U5tB7suvAjQ0Y4NjP6pFCrVhnaaPY1omShsjkoWDPwuvf mSgnbV9rigdLLvXxTUNg8M+K+xGDqV3lmhTZa7V3BAkD+xqUcnq1WqW+MYyUX7ZTJw2I 9zAZCPGBnwG1Hqwhq2Ce50lFCXzUsVotw2c+88eNRJoFDQFYVewYDdV687m32FvwopvX DFQnY5qBBKclOHtXOa5cSFLZDH/s271WARvN1Dg7isqaI+XzJ3uETAVznvGeT5g3fmne fXPnn17Urq3d90fJJuJDgUBQQ8hyiJFb2JViPSQCr/d1ZCYQLmi7hIysM08V5mqxvuU5 RWKQ== X-Received: by 10.236.223.130 with SMTP id v2mr2834810yhp.34.1377096257620; Wed, 21 Aug 2013 07:44:17 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.107.133 with SMTP id hc5ls609816qeb.8.gmail; Wed, 21 Aug 2013 07:44:17 -0700 (PDT) X-Received: by 10.220.164.70 with SMTP id d6mr6749420vcy.19.1377096257510; Wed, 21 Aug 2013 07:44:17 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id jf10si2217331vdb.89.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:44:17 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 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.169; Received: by mail-vc0-f169.google.com with SMTP id ib11so333761vcb.0 for ; Wed, 21 Aug 2013 07:44:17 -0700 (PDT) X-Gm-Message-State: ALoCoQmPCkvuzVMPKMpqNQnvTrUtXKfeuNJ72XAIANhJ4LJpFlTdghb07/f8yEc6u03w+TnwSoqM X-Received: by 10.58.196.132 with SMTP id im4mr1302120vec.28.1377096257415; Wed, 21 Aug 2013 07:44:17 -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 u4csp224620vcz; Wed, 21 Aug 2013 07:44:16 -0700 (PDT) X-Received: by 10.68.252.33 with SMTP id zp1mr88196pbc.95.1377096256559; Wed, 21 Aug 2013 07:44:16 -0700 (PDT) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx.google.com with ESMTPS id ei3si5435835pbb.67.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:44:16 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.54 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.54; Received: by mail-pb0-f54.google.com with SMTP id ro12so480558pbb.13 for ; Wed, 21 Aug 2013 07:44:16 -0700 (PDT) X-Received: by 10.68.186.193 with SMTP id fm1mr55178pbc.163.1377096256097; Wed, 21 Aug 2013 07:44:16 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id xs1sm10619469pac.7.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 21 Aug 2013 07:44:15 -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 , spear-devel@list.st.com Subject: [PATCH 13/14] cpufreq: spear: use cpufreq_generic_init() routine Date: Wed, 21 Aug 2013 20:12:32 +0530 Message-Id: <008f055ed70032794385522d6c42248d7c2510f8.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.220.169 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. Cc: spear-devel@list.st.com Signed-off-by: Viresh Kumar --- drivers/cpufreq/spear-cpufreq.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/cpufreq/spear-cpufreq.c b/drivers/cpufreq/spear-cpufreq.c index 4ad35a5..d9a8c5f 100644 --- a/drivers/cpufreq/spear-cpufreq.c +++ b/drivers/cpufreq/spear-cpufreq.c @@ -156,18 +156,8 @@ static int spear_cpufreq_target(struct cpufreq_policy *policy, static int spear_cpufreq_init(struct cpufreq_policy *policy) { - int ret; - - ret = cpufreq_table_validate_and_show(policy, spear_cpufreq.freq_tbl); - if (ret) { - pr_err("cpufreq_table_validate_and_show() failed"); - return ret; - } - - policy->cpuinfo.transition_latency = spear_cpufreq.transition_latency; - cpumask_setall(policy->cpus); - - return 0; + return cpufreq_generic_init(policy, spear_cpufreq.freq_tbl, + spear_cpufreq.transition_latency); } static struct cpufreq_driver spear_cpufreq_driver = {