From patchwork Thu Aug 8 13:48:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18858 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4F961246A4 for ; Thu, 8 Aug 2013 13:50:01 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id i72sf3658598yha.0 for ; Thu, 08 Aug 2013 06:50:01 -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=hu6SfmZQhW91RCGvyOkhP+7DL6YltrEuroaD+QpWUQ0=; b=TAmCFeojfT5otGd4vEUPVjRDv+z01Zt57PdH1vLzvnviv66CCQmd4A3e/qNawAWrWd GkB80WA3QOCrQZ23uO1emF/i9UAEgj7PKDmpX8z+tKOsIVV2CvPU03+j0NYbGNle66nw LTTUNMQNgRselqcmP9PSLSvYTrfbvHwNxgG6UqVrSGSJweNg4QhBtix0PaIwiJH1He7F kErQfXrtXbMwlStgT5IJVzfxglypLsYFl/PZBKbFtykNa1DHfuy0WLw8ejFuNP0S8bY4 JMYNx4E4NM1lmOEnbq3ddOUV48ln5KT/5+9aYjI3c5yUJEj71S5Q82AjQKKv2uM6miHT oFtQ== X-Received: by 10.236.129.178 with SMTP id h38mr3178292yhi.12.1375969800934; Thu, 08 Aug 2013 06:50:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.116.168 with SMTP id jx8ls701834qeb.34.gmail; Thu, 08 Aug 2013 06:50:00 -0700 (PDT) X-Received: by 10.58.2.137 with SMTP id 9mr3209047veu.50.1375969800817; Thu, 08 Aug 2013 06:50:00 -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 pa20si3098226veb.14.2013.08.08.06.50.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:50:00 -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 b10so3043831vea.21 for ; Thu, 08 Aug 2013 06:50:00 -0700 (PDT) X-Gm-Message-State: ALoCoQntuF3+lpHo5oFcohDuH58ys8djdagegrgoJRi4iPvDM0o8U6kjUj2NszYc2Ej5voyjTZEe X-Received: by 10.52.243.201 with SMTP id xa9mr2510585vdc.106.1375969800723; Thu, 08 Aug 2013 06:50:00 -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 u4csp16725vcz; Thu, 8 Aug 2013 06:50:00 -0700 (PDT) X-Received: by 10.68.189.133 with SMTP id gi5mr6284421pbc.49.1375969799776; Thu, 08 Aug 2013 06:49:59 -0700 (PDT) Received: from mail-pb0-f46.google.com (mail-pb0-f46.google.com [209.85.160.46]) by mx.google.com with ESMTPS id zs4si8630399pbb.106.2013.08.08.06.49.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:49:59 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.46 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.160.46; Received: by mail-pb0-f46.google.com with SMTP id rq2so3264230pbb.33 for ; Thu, 08 Aug 2013 06:49:59 -0700 (PDT) X-Received: by 10.69.17.1 with SMTP id ga1mr6208612pbd.38.1375969799357; Thu, 08 Aug 2013 06:49:59 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id t9sm14350107pba.46.2013.08.08.06.49.54 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:49:58 -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 09/35] cpufreq: cris: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:11 +0530 Message-Id: <4ad1afa147eb2a5cca45c7f36344979783bd45e0.1375964117.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: , 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 --- 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)