From patchwork Thu Aug 8 13:48:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2841257 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B6974BF546 for ; Thu, 8 Aug 2013 14:43:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A6405203B4 for ; Thu, 8 Aug 2013 14:43:11 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 51DA520378 for ; Thu, 8 Aug 2013 14:43:10 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7QeP-0005Ra-P7; Thu, 08 Aug 2013 13:53:14 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7QeN-0004j7-Fj; Thu, 08 Aug 2013 13:53:11 +0000 Received: from mail-pa0-f43.google.com ([209.85.220.43]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Qcg-0004Om-3m for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2013 13:51:30 +0000 Received: by mail-pa0-f43.google.com with SMTP id hz10so3473029pad.2 for ; Thu, 08 Aug 2013 06:51:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=sdrM4OhF4LBOs0ILK9sy6B3YNoCuSztLZP7Crz8Htt4=; b=TiRXJzWOEfvvqiqxD0xcL5JbY1eD+8nGIcA0FNYQRimJ+4+HVBPCCGmjMaaLJ1mFDp QBk9JmsJY8tFil0yitwXXxJ78DXwvLVokpFHtFEW/vyFvPcqkxpWXWrBu/VChcEPCfE2 iKxqLm7D12cN8Lpan4+O0t2d1NO8Ydnz/cDd6pJ2NBpKKhYFuRG4LgkLn2dQq69l0G5Q KqYnI2QWKK6PhdJ05+TDpPO0whU64r3tyC46VewAuZFyMgSTaOg9giBl2VgfKHXj2udb 1VGwVZgRI75dQe7OapWnlkvcucq5V9wyTQx9MrwPdcl6wF0F1usZnej5VWhxYBUlV4e2 mVHA== X-Gm-Message-State: ALoCoQnh2XnK5RJT3LYiLUOtkZyhEX7DhBR/3GrEZf5F0QCqjX2aZI8PRmAe7FPtp8gz80IyMiew X-Received: by 10.68.231.200 with SMTP id ti8mr6244229pbc.46.1375969864505; Thu, 08 Aug 2013 06:51:04 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id sz6sm16717607pab.5.2013.08.08.06.51.00 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:51:03 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 18/35] cpufreq: longhaul: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:20 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130808_095126_304550_38DAC2A1 X-CRM114-Status: UNSURE ( 9.99 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Viresh Kumar , patches@linaro.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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/longhaul.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c index 4ada1cc..70b66fd 100644 --- a/drivers/cpufreq/longhaul.c +++ b/drivers/cpufreq/longhaul.c @@ -921,13 +921,7 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy) policy->cpuinfo.transition_latency = 200000; /* nsec */ policy->cur = calc_speed(longhaul_get_cpu_mult()); - ret = cpufreq_frequency_table_cpuinfo(policy, longhaul_table); - if (ret) - return ret; - - cpufreq_frequency_table_get_attr(longhaul_table, policy->cpu); - - return 0; + return cpufreq_table_validate_and_show(policy, longhaul_table); } static int longhaul_cpu_exit(struct cpufreq_policy *policy)