From patchwork Thu Aug 8 13:48:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18879 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CB3BC246A4 for ; Thu, 8 Aug 2013 13:52:32 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id bv4sf823130qab.0 for ; Thu, 08 Aug 2013 06:52:32 -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=mSd8YB8xrZEFgf/4pycWM3J4KGxxKs2M8QO61GF5lFE=; b=XGt3hKVv8ANa3fzHNtOZ4nFiiSU5vaFDtHvvr0h8n16szvh832CoHg8g+K+XrRAkWR tAnqmVeYTrO73lv+dk1tNmtgNucq+86J9PuoLD0KDQm9NL/t97LygnvWXh55SkQbikVN wGH0cSoRc+e7k6InTYEF72s5UnT2yvgpFWJjTj3hbdRNwciyvu3HhnxLNtiDA7Z2W04k 5jOfKphKv1kUDGTxnV6LG4TqZRsl1zAcelcbbrcN41tpkeFk+YsvbxUPeiYJiw4plAzC oIdFxDEyMRW5vjelq5morin3tfn2MTfdTyrPEEZ9MNACLYafhjWDgps8Xxr9uChkbqI1 hzfw== X-Received: by 10.236.93.113 with SMTP id k77mr3360290yhf.25.1375969952606; Thu, 08 Aug 2013 06:52:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.101.44 with SMTP id fd12ls1157960qeb.98.gmail; Thu, 08 Aug 2013 06:52:32 -0700 (PDT) X-Received: by 10.220.86.200 with SMTP id t8mr4067878vcl.49.1375969952481; Thu, 08 Aug 2013 06:52:32 -0700 (PDT) Received: from mail-vb0-f42.google.com (mail-vb0-f42.google.com [209.85.212.42]) by mx.google.com with ESMTPS id l8si3098670vez.48.2013.08.08.06.52.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:32 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.42 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.42; Received: by mail-vb0-f42.google.com with SMTP id e12so3220003vbg.15 for ; Thu, 08 Aug 2013 06:52:32 -0700 (PDT) X-Gm-Message-State: ALoCoQmqf82eq3GLmQRFQK8ihWuhXPJo7K1y6UbYhEAWmq5ihEu/Dq5TjfmWIC4hYjHPNiuRgxIv X-Received: by 10.58.134.84 with SMTP id pi20mr1447242veb.55.1375969952408; Thu, 08 Aug 2013 06:52:32 -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 u4csp16882vcz; Thu, 8 Aug 2013 06:52:31 -0700 (PDT) X-Received: by 10.68.189.162 with SMTP id gj2mr6213137pbc.96.1375969951610; Thu, 08 Aug 2013 06:52:31 -0700 (PDT) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by mx.google.com with ESMTPS id zo4si8611171pbc.222.2013.08.08.06.52.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:31 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.44 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.44; Received: by mail-pa0-f44.google.com with SMTP id fz6so703418pac.17 for ; Thu, 08 Aug 2013 06:52:31 -0700 (PDT) X-Received: by 10.68.180.1 with SMTP id dk1mr6204869pbc.174.1375969951077; Thu, 08 Aug 2013 06:52:31 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id zv11sm16729249pab.3.2013.08.08.06.52.26 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:30 -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 30/35] cpufreq: sc520: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:32 +0530 Message-Id: <8d7ce27a8756d11c8aeefc9f106436a01b8b8289.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.212.42 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/sc520_freq.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/cpufreq/sc520_freq.c b/drivers/cpufreq/sc520_freq.c index d6f6c6f..bb9c0de 100644 --- a/drivers/cpufreq/sc520_freq.c +++ b/drivers/cpufreq/sc520_freq.c @@ -106,7 +106,6 @@ static int sc520_freq_target(struct cpufreq_policy *policy, static int sc520_freq_cpu_init(struct cpufreq_policy *policy) { struct cpuinfo_x86 *c = &cpu_data(0); - int result; /* capability check */ if (c->x86_vendor != X86_VENDOR_AMD || @@ -117,13 +116,7 @@ static int sc520_freq_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = 1000000; /* 1ms */ policy->cur = sc520_freq_get_cpu_frequency(0); - result = cpufreq_frequency_table_cpuinfo(policy, sc520_freq_table); - if (result) - return result; - - cpufreq_frequency_table_get_attr(sc520_freq_table, policy->cpu); - - return 0; + return cpufreq_table_validate_and_show(policy, sc520_freq_table); }