From patchwork Thu Aug 8 13:48:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 18881 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f69.google.com (mail-vb0-f69.google.com [209.85.212.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 41946246A4 for ; Thu, 8 Aug 2013 13:52:50 +0000 (UTC) Received: by mail-vb0-f69.google.com with SMTP id e13sf423287vbg.4 for ; Thu, 08 Aug 2013 06:52:50 -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=GlKwFgC/IBdUYDNVno2QSkfsGexSXeHUGr7oKXLH8oc=; b=P13HKxIc/adHSGaNn+y8hPaOp1qq9mtL2f2fGc66uePPwqDdkM1zZ980itJglcro1J piSEkmU/KZ40qx5b+Yumeb/OOOhtpGjq93FK+xuF30voQVlIoxfpt0mgrtHYmqiyUVTU WSSmWJv03TKYr1X7UkXAgp8r5led0JXLR3aB76SaxDCkSxJk+/nfAnBlKpBCvS7mTjJp UfGAdY1iq/Hqii6smJWtvuKWhGu3WmROyqh/pr+bH850SOTLbH4PPuQ9ppbnGQ028R4w abtlhXlbGg47tzP4hNBxzR9u3x0iOoAkYXsbrEFWp8EFqWAKd3ifd1p75wc5QMTe/zrY EMKQ== X-Received: by 10.236.156.33 with SMTP id l21mr3409528yhk.18.1375969969962; Thu, 08 Aug 2013 06:52:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.26.70 with SMTP id j6ls1108085qeg.94.gmail; Thu, 08 Aug 2013 06:52:49 -0700 (PDT) X-Received: by 10.59.7.1 with SMTP id cy1mr411461ved.79.1375969969860; Thu, 08 Aug 2013 06:52:49 -0700 (PDT) Received: from mail-vb0-f49.google.com (mail-vb0-f49.google.com [209.85.212.49]) by mx.google.com with ESMTPS id gq10si3089968vdc.121.2013.08.08.06.52.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:49 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.49 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.49; Received: by mail-vb0-f49.google.com with SMTP id w16so3212944vbb.36 for ; Thu, 08 Aug 2013 06:52:49 -0700 (PDT) X-Gm-Message-State: ALoCoQlTSH2H9iOoKMv6jZZaPpFQMjT32tTORC8bchtDLGiLsO4Vyjhf59cvxdZUSOUFxHXwP5iV X-Received: by 10.220.164.202 with SMTP id f10mr4012057vcy.25.1375969969771; Thu, 08 Aug 2013 06:52:49 -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 u4csp16893vcz; Thu, 8 Aug 2013 06:52:49 -0700 (PDT) X-Received: by 10.68.252.233 with SMTP id zv9mr6212322pbc.69.1375969968822; Thu, 08 Aug 2013 06:52:48 -0700 (PDT) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by mx.google.com with ESMTPS id sr9si9742838pab.270.2013.08.08.06.52.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:48 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.50 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.50; Received: by mail-pa0-f50.google.com with SMTP id fb10so3499083pad.37 for ; Thu, 08 Aug 2013 06:52:48 -0700 (PDT) X-Received: by 10.68.234.72 with SMTP id uc8mr6356729pbc.35.1375969968439; Thu, 08 Aug 2013 06:52:48 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id xl3sm14407728pbb.17.2013.08.08.06.52.44 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:47 -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" , sparclinux@vger.kernel.org Subject: [PATCH 32/35] cpufreq: sparc: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:34 +0530 Message-Id: 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.49 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 Cc: sparclinux@vger.kernel.org Signed-off-by: Viresh Kumar --- drivers/cpufreq/sparc-us2e-cpufreq.c | 6 +----- drivers/cpufreq/sparc-us3-cpufreq.c | 7 +------ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/cpufreq/sparc-us2e-cpufreq.c b/drivers/cpufreq/sparc-us2e-cpufreq.c index 80e6d92..e35840d 100644 --- a/drivers/cpufreq/sparc-us2e-cpufreq.c +++ b/drivers/cpufreq/sparc-us2e-cpufreq.c @@ -307,7 +307,6 @@ static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy) unsigned long clock_tick = sparc64_get_clock_tick(cpu) / 1000; struct cpufreq_frequency_table *table = &us2e_freq_table[cpu].table[0]; - int ret; table[0].driver_data = 0; table[0].frequency = clock_tick / 1; @@ -325,10 +324,7 @@ static int __init us2e_freq_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = 0; policy->cur = clock_tick; - ret = cpufreq_frequency_table_cpuinfo(policy, table); - if (!ret) - cpufreq_frequency_table_get_attr(table, policy->cpu); - return ret; + return cpufreq_table_validate_and_show(policy, table); } static int us2e_freq_cpu_exit(struct cpufreq_policy *policy) diff --git a/drivers/cpufreq/sparc-us3-cpufreq.c b/drivers/cpufreq/sparc-us3-cpufreq.c index 73a90de..23f2d3b 100644 --- a/drivers/cpufreq/sparc-us3-cpufreq.c +++ b/drivers/cpufreq/sparc-us3-cpufreq.c @@ -168,7 +168,6 @@ static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) unsigned long clock_tick = sparc64_get_clock_tick(cpu) / 1000; struct cpufreq_frequency_table *table = &us3_freq_table[cpu].table[0]; - int ret; table[0].driver_data = 0; table[0].frequency = clock_tick / 1; @@ -182,11 +181,7 @@ static int __init us3_freq_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = 0; policy->cur = clock_tick; - ret = cpufreq_frequency_table_cpuinfo(policy, table); - if (!ret) - cpufreq_frequency_table_get_attr(table, policy->cpu); - - return ret; + return cpufreq_table_validate_and_show(policy, table); } static int us3_freq_cpu_exit(struct cpufreq_policy *policy)