From patchwork Fri Sep 13 13:01:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20184 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f70.google.com (mail-vb0-f70.google.com [209.85.212.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A0B8320358 for ; Fri, 13 Sep 2013 13:18:26 +0000 (UTC) Received: by mail-vb0-f70.google.com with SMTP id h10sf1202019vbh.1 for ; Fri, 13 Sep 2013 06:18:26 -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=XNtVhtvpFPN29HWo7S+/ZWMOywgiNxLLhSpjbxRwmow=; b=IhGQQQex+zY839YDq0dNNHIpLkCUIX40yx+Fq4CloouC/byqv4SbTSyEnlRMqIAyXG 9T4Z3ZYiAt+KXi8q5gWdvat4Jfpem66GYUOX0cr8fkSmgkgZAevUMSdj4VYJGJ4OqPwG Pzkz8uWe3chKOoXBNFrOL4IhEhs0+cj2FQl1IxKLedWBi9qYoYAfV1dj2bncejZ2g/++ OApdV+ZUJme585BxhHjFWOsojH58ofVKzGZhel8MvJw/PbHAaTlnHo/EP0qa+kwvY9ov 16IbbJiV/JJH+cpniDUo3Xa61xkR3Mlsym6HB0a1pjKrUCz8Jtb2NRiAkHn9sB3qIBuM CZVQ== X-Gm-Message-State: ALoCoQlCrROdeTCToxMNFTpUdqAMRIewWPC+5L2E7TYdVRQ2PUuY6u0/JCjetAE5wtZdK2jsVT+v X-Received: by 10.236.103.199 with SMTP id f47mr498413yhg.54.1379078306341; Fri, 13 Sep 2013 06:18:26 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.16.6 with SMTP id b6ls1076013qed.79.gmail; Fri, 13 Sep 2013 06:18:26 -0700 (PDT) X-Received: by 10.52.118.41 with SMTP id kj9mr34705vdb.44.1379078306104; Fri, 13 Sep 2013 06:18:26 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id wp10si3118614vdb.19.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:18:26 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id jx11so934358veb.7 for ; Fri, 13 Sep 2013 06:18:26 -0700 (PDT) X-Received: by 10.220.74.69 with SMTP id t5mr12046408vcj.18.1379078306026; Fri, 13 Sep 2013 06:18:26 -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 u4csp80214vcz; Fri, 13 Sep 2013 06:18:25 -0700 (PDT) X-Received: by 10.68.52.200 with SMTP id v8mr13607639pbo.48.1379078305171; Fri, 13 Sep 2013 06:18:25 -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 qe4si5470838pbc.238.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:18:25 -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 fz6so2504207pac.17 for ; Fri, 13 Sep 2013 06:18:24 -0700 (PDT) X-Received: by 10.68.162.194 with SMTP id yc2mr13308080pbb.141.1379078304687; Fri, 13 Sep 2013 06:18:24 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id oh2sm11745596pbb.3.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:18:24 -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 , Jesper Nilsson , Mikael Starvik , linux-cris-kernel@axis.com Subject: [PATCH 130/228] cpufreq: cris: use cpufreq_generic_init() routine Date: Fri, 13 Sep 2013 18:31:16 +0530 Message-Id: <2b5bec06ece382705b51aaf97f53762ff540639f.1379063063.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.128.176 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: Jesper Nilsson Cc: Mikael Starvik Cc: linux-cris-kernel@axis.com Signed-off-by: Viresh Kumar Acked-by: Jesper Nilsson --- drivers/cpufreq/cris-artpec3-cpufreq.c | 6 +----- drivers/cpufreq/cris-etraxfs-cpufreq.c | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/cpufreq/cris-artpec3-cpufreq.c b/drivers/cpufreq/cris-artpec3-cpufreq.c index 4d88e4f..05fdc7e 100644 --- a/drivers/cpufreq/cris-artpec3-cpufreq.c +++ b/drivers/cpufreq/cris-artpec3-cpufreq.c @@ -71,13 +71,9 @@ static int cris_freq_target(struct cpufreq_policy *policy, static int cris_freq_cpu_init(struct cpufreq_policy *policy) { - /* cpuinfo and default policy values */ - policy->cpuinfo.transition_latency = 1000000; /* 1ms */ - - return cpufreq_table_validate_and_show(policy, cris_freq_table); + return cpufreq_generic_init(policy, cris_freq_table, 1000000); } - static struct cpufreq_driver cris_freq_driver = { .get = cris_freq_get_cpu_frequency, .verify = cpufreq_generic_frequency_table_verify, diff --git a/drivers/cpufreq/cris-etraxfs-cpufreq.c b/drivers/cpufreq/cris-etraxfs-cpufreq.c index f7d2d49..fac2b26 100644 --- a/drivers/cpufreq/cris-etraxfs-cpufreq.c +++ b/drivers/cpufreq/cris-etraxfs-cpufreq.c @@ -70,10 +70,7 @@ static int cris_freq_target(struct cpufreq_policy *policy, static int cris_freq_cpu_init(struct cpufreq_policy *policy) { - /* cpuinfo and default policy values */ - policy->cpuinfo.transition_latency = 1000000; /* 1ms */ - - return cpufreq_table_validate_and_show(policy, cris_freq_table); + return cpufreq_generic_init(policy, cris_freq_table, 1000000); } static struct cpufreq_driver cris_freq_driver = {