From patchwork Fri Sep 13 12:59:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20098 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f199.google.com (mail-ve0-f199.google.com [209.85.128.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BC7B5202E6 for ; Fri, 13 Sep 2013 13:08:16 +0000 (UTC) Received: by mail-ve0-f199.google.com with SMTP id db12sf1224563veb.2 for ; Fri, 13 Sep 2013 06:08:16 -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=3gXcDrORsRDopalh8pLWUoehNtGf9oyunGEik6fMQjk=; b=H6YDPChW6kVKWhM1ee65udXRnq1xQXLzprUP6DXBVhb7ijlLCs6jYL2M4fOsALDJTF PxnHVA/Kc6fCwYOaKwGHolweMxfoul+EvJwcqW0/zzhcNNLBaFAhMQF/MwOVLKSheUhn dHbShuO3pry++PtmdwpkNBHET02BMfh5TiiNLY4uDzkM5u3S2HSRdxEiruNY326NCOvm unNl6C5CMf1mz0o7/+drLQxxngXCdUdWeAymyt7SGSc42WVOCiGQ7duXOc2jlTrfVIkk kH3eeQ90XreWNAJgf6bjBgoMYSJxwtpkNBmPoND58wULneEYWdbHicPTgIgp2m8zkRMV QEGQ== X-Gm-Message-State: ALoCoQn4tzEe5mWqnO4JKGirta5+WQvmB+dGk7bWTmQhvZxSAAvfvAXSYd0juIp2uvWevhVbWHT3 X-Received: by 10.236.216.17 with SMTP id f17mr346120yhp.18.1379077696519; Fri, 13 Sep 2013 06:08:16 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.116.228 with SMTP id jz4ls1186226qeb.51.gmail; Fri, 13 Sep 2013 06:08:16 -0700 (PDT) X-Received: by 10.221.27.73 with SMTP id rp9mr737015vcb.29.1379077696296; Fri, 13 Sep 2013 06:08:16 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id o3si384744ves.48.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:08:16 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.172 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.172; Received: by mail-vc0-f172.google.com with SMTP id m17so892395vca.17 for ; Fri, 13 Sep 2013 06:08:16 -0700 (PDT) X-Received: by 10.52.166.200 with SMTP id zi8mr192563vdb.38.1379077696213; Fri, 13 Sep 2013 06:08:16 -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 u4csp79708vcz; Fri, 13 Sep 2013 06:08:15 -0700 (PDT) X-Received: by 10.66.154.169 with SMTP id vp9mr1514856pab.190.1379077695375; Fri, 13 Sep 2013 06:08:15 -0700 (PDT) Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by mx.google.com with ESMTPS id ct5si7433976pbb.71.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:08:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.173 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.192.173; Received: by mail-pd0-f173.google.com with SMTP id p10so1231128pdj.4 for ; Fri, 13 Sep 2013 06:08:14 -0700 (PDT) X-Received: by 10.66.248.198 with SMTP id yo6mr14883520pac.143.1379077694576; Fri, 13 Sep 2013 06:08:14 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id fl3sm18006655pad.10.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:08:14 -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 , "David S. Miller" Subject: [PATCH 044/228] cpufreq: speedstep: use cpufreq_table_validate_and_show() Date: Fri, 13 Sep 2013 18:29:50 +0530 Message-Id: <9013bee8cd8d799dabdf630317285947f2bdbcf9.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.172 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: David S. Miller Signed-off-by: Viresh Kumar --- drivers/cpufreq/speedstep-centrino.c | 10 +--------- drivers/cpufreq/speedstep-ich.c | 9 +-------- drivers/cpufreq/speedstep-smi.c | 8 +------- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c index f897d51..f180561 100644 --- a/drivers/cpufreq/speedstep-centrino.c +++ b/drivers/cpufreq/speedstep-centrino.c @@ -345,7 +345,6 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) struct cpuinfo_x86 *cpu = &cpu_data(policy->cpu); unsigned freq; unsigned l, h; - int ret; int i; /* Only Intel makes Enhanced Speedstep-capable CPUs */ @@ -402,15 +401,8 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) pr_debug("centrino_cpu_init: cur=%dkHz\n", policy->cur); - ret = cpufreq_frequency_table_cpuinfo(policy, + return cpufreq_table_validate_and_show(policy, per_cpu(centrino_model, policy->cpu)->op_points); - if (ret) - return (ret); - - cpufreq_frequency_table_get_attr( - per_cpu(centrino_model, policy->cpu)->op_points, policy->cpu); - - return 0; } static int centrino_cpu_exit(struct cpufreq_policy *policy) diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c index 5355abb..86a184e 100644 --- a/drivers/cpufreq/speedstep-ich.c +++ b/drivers/cpufreq/speedstep-ich.c @@ -320,7 +320,6 @@ static void get_freqs_on_cpu(void *_get_freqs) static int speedstep_cpu_init(struct cpufreq_policy *policy) { - int result; unsigned int policy_cpu, speed; struct get_freqs gf; @@ -349,13 +348,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) /* cpuinfo and default policy values */ policy->cur = speed; - result = cpufreq_frequency_table_cpuinfo(policy, speedstep_freqs); - if (result) - return result; - - cpufreq_frequency_table_get_attr(speedstep_freqs, policy->cpu); - - return 0; + return cpufreq_table_validate_and_show(policy, speedstep_freqs); } diff --git a/drivers/cpufreq/speedstep-smi.c b/drivers/cpufreq/speedstep-smi.c index abfba4f..f4d0318 100644 --- a/drivers/cpufreq/speedstep-smi.c +++ b/drivers/cpufreq/speedstep-smi.c @@ -329,13 +329,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; policy->cur = speed; - result = cpufreq_frequency_table_cpuinfo(policy, speedstep_freqs); - if (result) - return result; - - cpufreq_frequency_table_get_attr(speedstep_freqs, policy->cpu); - - return 0; + return cpufreq_table_validate_and_show(policy, speedstep_freqs); } static int speedstep_cpu_exit(struct cpufreq_policy *policy)