From patchwork Fri Sep 13 13:01:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20199 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f72.google.com (mail-qe0-f72.google.com [209.85.128.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6496320358 for ; Fri, 13 Sep 2013 13:20:09 +0000 (UTC) Received: by mail-qe0-f72.google.com with SMTP id 6sf1228246qea.3 for ; Fri, 13 Sep 2013 06:20:09 -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=2uu7ARw4Lm+YYZ1hsTOQniETabfgzNmQn1Mfjpxyw8Y=; b=SAUqw1G3Hux/KsarRTNzU9knsYbQcHaksO+8B9dKcDQtTGDQ6LOSgGUdVtiDZRLuNO kP0J6F0j4GcxptRFZuyjL9HHKTeWOUCTbfojDKgA5LG5BOpcuA/tsSeizEe+f/xBYjkG J8MssxigXke+Kyia81motOWjx6x3i5tnDGfeUUbBfHr/AIIHk6OnK1PYx+EfWqhHT8lg BGS+l/khJWlQfglFG+cms0ZNxSydVIb+pYK8gaPz+4tFM1HSUh6bvDJ99hY2N+ipJcD3 T2AVaD+p+bMcdr4iKD0O5UeY4kP6RrLzJxRYnDfzhzbzvI7RQsc4baJJKpRMYCkfWY6+ tPKg== X-Gm-Message-State: ALoCoQkodoK1NYB5TIR6k7JdRsY8liUB4z4p33nEDv81ToR1Gwhz3jNljTozY8sfcTxj03ByKST2 X-Received: by 10.236.14.100 with SMTP id c64mr5159896yhc.38.1379078409239; Fri, 13 Sep 2013 06:20:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.70.161 with SMTP id n1ls1180341qeu.27.gmail; Fri, 13 Sep 2013 06:20:09 -0700 (PDT) X-Received: by 10.52.34.109 with SMTP id y13mr10291843vdi.8.1379078409029; Fri, 13 Sep 2013 06:20:09 -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 oh2si3112172vcb.85.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:20:09 -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 w16so881646vbb.8 for ; Fri, 13 Sep 2013 06:20:09 -0700 (PDT) X-Received: by 10.52.165.131 with SMTP id yy3mr5989955vdb.25.1379078408954; Fri, 13 Sep 2013 06:20:08 -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 u4csp80310vcz; Fri, 13 Sep 2013 06:20:08 -0700 (PDT) X-Received: by 10.66.171.77 with SMTP id as13mr2071348pac.170.1379078408108; Fri, 13 Sep 2013 06:20:08 -0700 (PDT) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by mx.google.com with ESMTPS id gb4si7470287pbb.60.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:20:08 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.44 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.44; Received: by mail-pa0-f44.google.com with SMTP id fz6so2526469pac.31 for ; Fri, 13 Sep 2013 06:20:07 -0700 (PDT) X-Received: by 10.66.168.7 with SMTP id zs7mr15530171pab.152.1379078407630; Fri, 13 Sep 2013 06:20:07 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id ry4sm18089084pab.4.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:20:07 -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 145/228] cpufreq: spear: use cpufreq_generic_init() routine Date: Fri, 13 Sep 2013 18:31:31 +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/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 aacdb61..2a03158 100644 --- a/drivers/cpufreq/spear-cpufreq.c +++ b/drivers/cpufreq/spear-cpufreq.c @@ -171,18 +171,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 = {