From patchwork Fri Sep 13 13:01:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20186 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 64EBA20358 for ; Fri, 13 Sep 2013 13:18:40 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id l13sf1207173qcy.1 for ; Fri, 13 Sep 2013 06:18:40 -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=6UD7FWpoac2rj+5lvqYoRAnP6Anyc3qnQGBLfuo7ks8=; b=CfhhaPo5sdzDi1EE2L6jg2Gs1zrF/8hudaEBEaLbA0OG20HCpq9AgnljcCxNfYiAjB w0kZyjSnFGh2xFGMZt2lFNKLZjiS0WHDO6fWu4NtF8PL/czp9YeNreShsltwxxJh/JKU KKORwOg3eh5RMTkx60odWDYMDn2tvcr/nDP88nzhztNVrloo70wC6uyewMzEpO0CkcSl Ju+OjKuJZyJyOoZo8/aUxrguAnHM2g92U6kHAJ5lFfJkN8G7WG4Nx9JATtVw1NrYsVp1 jy7Nc8NAVGnZD6cSKqGPrSOpDJgpNg3emo/P6ZwtLdAgHYIIWUC4fbu52Ri1ITcQ34Ll juGw== X-Gm-Message-State: ALoCoQnpl/2nq9NuPFgOdMkXjLnQ7C8E7d9MpweKIrbAknJkJx6/rQEYbxoWIQZPO9jsFzsxzzjw X-Received: by 10.236.103.199 with SMTP id f47mr498896yhg.54.1379078320142; Fri, 13 Sep 2013 06:18:40 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.62.72 with SMTP id w8ls1158321qer.2.gmail; Fri, 13 Sep 2013 06:18:39 -0700 (PDT) X-Received: by 10.220.97.145 with SMTP id l17mr57703vcn.35.1379078319939; Fri, 13 Sep 2013 06:18:39 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id sc5si3100656vdc.100.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:18:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.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.128.169; Received: by mail-ve0-f169.google.com with SMTP id db12so979972veb.0 for ; Fri, 13 Sep 2013 06:18:39 -0700 (PDT) X-Received: by 10.52.122.68 with SMTP id lq4mr10124796vdb.21.1379078319862; Fri, 13 Sep 2013 06:18:39 -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 u4csp80228vcz; Fri, 13 Sep 2013 06:18:39 -0700 (PDT) X-Received: by 10.66.217.166 with SMTP id oz6mr15498871pac.22.1379078318995; Fri, 13 Sep 2013 06:18:38 -0700 (PDT) Received: from mail-pb0-f44.google.com (mail-pb0-f44.google.com [209.85.160.44]) by mx.google.com with ESMTPS id fl1si11216355pab.141.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:18:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.44 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.44; Received: by mail-pb0-f44.google.com with SMTP id xa7so1228089pbc.17 for ; Fri, 13 Sep 2013 06:18:38 -0700 (PDT) X-Received: by 10.68.162.36 with SMTP id xx4mr13198414pbb.47.1379078318599; Fri, 13 Sep 2013 06:18:38 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id yh1sm7118548pbc.21.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:18:38 -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 132/228] cpufreq: dbx500: use cpufreq_generic_init() routine Date: Fri, 13 Sep 2013 18:31:18 +0530 Message-Id: <7703617a46c82433f7de644c35aafba9c880114d.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.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. Acked-by: Linus Walleij Signed-off-by: Viresh Kumar --- drivers/cpufreq/dbx500-cpufreq.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c index ae1aa60..a60f769 100644 --- a/drivers/cpufreq/dbx500-cpufreq.c +++ b/drivers/cpufreq/dbx500-cpufreq.c @@ -74,26 +74,7 @@ static unsigned int dbx500_cpufreq_getspeed(unsigned int cpu) static int dbx500_cpufreq_init(struct cpufreq_policy *policy) { - int res; - - /* get policy fields based on the table */ - res = cpufreq_table_validate_and_show(policy, freq_table); - if (res) { - pr_err("dbx500-cpufreq: Failed to read policy table\n"); - return res; - } - - /* - * FIXME : Need to take time measurement across the target() - * function with no/some/all drivers in the notification - * list. - */ - policy->cpuinfo.transition_latency = 20 * 1000; /* in ns */ - - /* policy sharing between dual CPUs */ - cpumask_setall(policy->cpus); - - return 0; + return cpufreq_generic_init(policy, freq_table, 20 * 1000); } static struct cpufreq_driver dbx500_cpufreq_driver = {