From patchwork Fri Sep 13 12:59:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20075 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f198.google.com (mail-vc0-f198.google.com [209.85.220.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 3F31D202E6 for ; Fri, 13 Sep 2013 13:05:35 +0000 (UTC) Received: by mail-vc0-f198.google.com with SMTP id ht10sf1185627vcb.9 for ; Fri, 13 Sep 2013 06:05:34 -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=4pa7J5uHccb0aldwUPcVSDLSTKB8nPFt7/hYVHqcYdo=; b=WS+9g1J4Y7+qG+yKA4z0HFeUEATd5riYg2+cxdBRUHti/J/RkQmqT+BIUOTHcXnV/y V5GbwJHPN1rvxVO5HDJDqg4uG8nbFSCgCnDPceTPlGzH34MlimzumjDMWuOEvjXA/g1W SfDdQu61OlHh97ZcNMtrRdMD480Wgbw20R6lvwttCSp7j9Ga3+G3GR22axrbs7pytxlM obgQvJkoQYp5OEK24g1j9QmBe88ce6rVTdAvGRFWfZ6ZHB/JB1DX83BrFbaRSGoHOEh2 qkx8Ff3N4VdYIHNNbEH8+S/d4T2qcTj3n6oNgb5XnOK3w0kYSV18nzy6c4kKzkpQcEFL 69xw== X-Gm-Message-State: ALoCoQnnm8RumdBHSx7v3XrBqgVevvsCieFXQtM8tOrE1hFK9y1dnjJjHZYSH5Dl4Q1q7Xkg4R4v X-Received: by 10.58.107.198 with SMTP id he6mr903955veb.2.1379077534961; Fri, 13 Sep 2013 06:05:34 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.87.36 with SMTP id u4ls1153247qez.56.gmail; Fri, 13 Sep 2013 06:05:34 -0700 (PDT) X-Received: by 10.52.116.74 with SMTP id ju10mr9978100vdb.20.1379077534688; Fri, 13 Sep 2013 06:05:34 -0700 (PDT) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx.google.com with ESMTPS id u7si3105448vcn.37.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:05:34 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.170 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.170; Received: by mail-ve0-f170.google.com with SMTP id c14so950407vea.29 for ; Fri, 13 Sep 2013 06:05:34 -0700 (PDT) X-Received: by 10.220.237.208 with SMTP id kp16mr11866774vcb.4.1379077533146; Fri, 13 Sep 2013 06:05:33 -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 u4csp79523vcz; Fri, 13 Sep 2013 06:05:31 -0700 (PDT) X-Received: by 10.66.19.137 with SMTP id f9mr15345640pae.138.1379077531287; Fri, 13 Sep 2013 06:05:31 -0700 (PDT) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) by mx.google.com with ESMTPS id ar2si7389825pbc.232.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:05:31 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.48 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.48; Received: by mail-pa0-f48.google.com with SMTP id kp13so2502635pab.35 for ; Fri, 13 Sep 2013 06:05:30 -0700 (PDT) X-Received: by 10.68.6.97 with SMTP id z1mr1228732pbz.131.1379077530857; Fri, 13 Sep 2013 06:05:30 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id nj9sm11663856pbc.13.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:05:29 -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 021/228] cpufreq: elanfreq: use cpufreq_table_validate_and_show() Date: Fri, 13 Sep 2013 18:29:27 +0530 Message-Id: <586f3c10141e2314b8f27348712d04f7eab81f87.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.170 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(). Signed-off-by: Viresh Kumar --- drivers/cpufreq/elanfreq.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c index 823a400..4000c34 100644 --- a/drivers/cpufreq/elanfreq.c +++ b/drivers/cpufreq/elanfreq.c @@ -202,7 +202,6 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy) { struct cpuinfo_x86 *c = &cpu_data(0); unsigned int i; - int result; /* capability check */ if ((c->x86_vendor != X86_VENDOR_AMD) || @@ -223,12 +222,7 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; policy->cur = elanfreq_get_cpu_frequency(0); - result = cpufreq_frequency_table_cpuinfo(policy, elanfreq_table); - if (result) - return result; - - cpufreq_frequency_table_get_attr(elanfreq_table, policy->cpu); - return 0; + return cpufreq_table_validate_and_show(policy, elanfreq_table); }