From patchwork Fri Sep 13 12:59:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20071 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4B856202E6 for ; Fri, 13 Sep 2013 13:05:04 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id hf12sf1181044vcb.11 for ; Fri, 13 Sep 2013 06:05:03 -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=hu6SfmZQhW91RCGvyOkhP+7DL6YltrEuroaD+QpWUQ0=; b=LO+js7XZ0GM9TvFLYiQwznc+RCR7mUzTn51yRMTxf1vATfiXma2plHRjDLJWIbMueF J5X+l5+0r7RKZzssU4RtFR841Pq29TJfdbYzWRxMVx82LztPyqdERuF2bJbXa1kKxV7G ejcLcRr/f4JpQ8eIx9WTYkRJ/l5BbaMBxJPNTgKICEdegJ2LBIKZzGCghvGFnr8BqeHA wxU1EJZP/g6MWxUEGjlPTGdOCwRFXwtmslhbf6WtkNI00knY+N5EmuSrP1IPVucOPjYp MG6g+DqVq5mApl1M5j8zxuJu0aXQVcFc1qCE+jmAnLs0Hbz0qLFUwq9mfTrBxIuEQ8Bg Rqrw== X-Gm-Message-State: ALoCoQnptvb/nRUstmPrPP9pkTS6aLAT2LB340I0bbcbjqcDsjMIggOx9dWnzANuV0vi/me4qGdk X-Received: by 10.236.109.134 with SMTP id s6mr4968064yhg.32.1379077503915; Fri, 13 Sep 2013 06:05:03 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.4.231 with SMTP id n7ls1099924qen.14.gmail; Fri, 13 Sep 2013 06:05:03 -0700 (PDT) X-Received: by 10.221.47.193 with SMTP id ut1mr11927148vcb.8.1379077503603; Fri, 13 Sep 2013 06:05:03 -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 ee8si3075981vdc.132.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:05:03 -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 ib11so897801vcb.14 for ; Fri, 13 Sep 2013 06:05:03 -0700 (PDT) X-Received: by 10.52.164.16 with SMTP id ym16mr165699vdb.39.1379077503242; Fri, 13 Sep 2013 06:05:03 -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 u4csp79495vcz; Fri, 13 Sep 2013 06:05:02 -0700 (PDT) X-Received: by 10.66.150.41 with SMTP id uf9mr15331394pab.108.1379077502227; Fri, 13 Sep 2013 06:05:02 -0700 (PDT) Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by mx.google.com with ESMTPS id lp9si11209251pab.18.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:05:02 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.174 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.174; Received: by mail-pd0-f174.google.com with SMTP id y13so1221985pdi.5 for ; Fri, 13 Sep 2013 06:05:01 -0700 (PDT) X-Received: by 10.68.181.132 with SMTP id dw4mr1983121pbc.179.1379077501804; Fri, 13 Sep 2013 06:05:01 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id im2sm11639171pbd.31.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:05:01 -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 017/228] cpufreq: cris: use cpufreq_table_validate_and_show() Date: Fri, 13 Sep 2013 18:29:23 +0530 Message-Id: <004c82aa4bdb721a03b38b3b5ef5fe7ca7841773.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.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: , Lets use cpufreq_table_validate_and_show() instead of calling cpufreq_frequency_table_cpuinfo() and cpufreq_frequency_table_get_attr(). 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 | 10 +--------- drivers/cpufreq/cris-etraxfs-cpufreq.c | 10 +--------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/cpufreq/cris-artpec3-cpufreq.c b/drivers/cpufreq/cris-artpec3-cpufreq.c index cb8276d..444fd96 100644 --- a/drivers/cpufreq/cris-artpec3-cpufreq.c +++ b/drivers/cpufreq/cris-artpec3-cpufreq.c @@ -76,19 +76,11 @@ static int cris_freq_target(struct cpufreq_policy *policy, static int cris_freq_cpu_init(struct cpufreq_policy *policy) { - int result; - /* cpuinfo and default policy values */ policy->cpuinfo.transition_latency = 1000000; /* 1ms */ policy->cur = cris_freq_get_cpu_frequency(0); - result = cpufreq_frequency_table_cpuinfo(policy, cris_freq_table); - if (result) - return (result); - - cpufreq_frequency_table_get_attr(cris_freq_table, policy->cpu); - - return 0; + return cpufreq_table_validate_and_show(policy, cris_freq_table); } diff --git a/drivers/cpufreq/cris-etraxfs-cpufreq.c b/drivers/cpufreq/cris-etraxfs-cpufreq.c index 72328f7..428395e 100644 --- a/drivers/cpufreq/cris-etraxfs-cpufreq.c +++ b/drivers/cpufreq/cris-etraxfs-cpufreq.c @@ -75,19 +75,11 @@ static int cris_freq_target(struct cpufreq_policy *policy, static int cris_freq_cpu_init(struct cpufreq_policy *policy) { - int result; - /* cpuinfo and default policy values */ policy->cpuinfo.transition_latency = 1000000; /* 1ms */ policy->cur = cris_freq_get_cpu_frequency(0); - result = cpufreq_frequency_table_cpuinfo(policy, cris_freq_table); - if (result) - return (result); - - cpufreq_frequency_table_get_attr(cris_freq_table, policy->cpu); - - return 0; + return cpufreq_table_validate_and_show(policy, cris_freq_table); } static int cris_freq_cpu_exit(struct cpufreq_policy *policy)