From patchwork Thu Aug 8 13:48:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2841255 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 E15BFBF546 for ; Thu, 8 Aug 2013 14:34:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 59A82204EA for ; Thu, 8 Aug 2013 14:34:02 +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 79281204AB for ; Thu, 8 Aug 2013 14:33:57 +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 1V7Qgx-000764-RT; Thu, 08 Aug 2013 13:55:52 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7QgK-0004y9-0O; Thu, 08 Aug 2013 13:55:12 +0000 Received: from mail-pa0-f47.google.com ([209.85.220.47]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7QeE-0004fK-9l for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2013 13:53:06 +0000 Received: by mail-pa0-f47.google.com with SMTP id kl13so3453628pab.20 for ; Thu, 08 Aug 2013 06:52:40 -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=PqCGsirhbMM06htKaYcuAmG2kH519pw86oD4822trSc=; b=hNCn2gW1Vb329ad/HQpQzx/SaPwl/puKsjeiEKI2KUPn3rDDKdLNBVoy5vS7xuPYvN A4CsTjCFQyM/AZl6YHSvOsHNHC2BJiVd7JXpI8bZLhfDAZ3Ixk49O3vCnBjbJqEWb0Ng gXNwxTYufv8UqggSq8Iyu3orvesCjOCsU8IyqGUya84IUhTFKzb8FCkbVt+/J601zUOt awnKz8xttkiG0ya/e0JMet+o0EA9mbDyDTBeN6BpOz8aFkxVly/6d4nrm1/LpUCNtNds vnfr2BrSkkzhlS+kjpFHZAXoLZnf2dRc84MHxy96NnxPRefNJIIRqZ0GSRnsuVaZpNbG YwHg== X-Gm-Message-State: ALoCoQm5CMA0E/6AfistwrZkwjFWnbHxCXftF2lvVm18/tN3leALMj6FQzZiEUSiT1ntg6woNO5R X-Received: by 10.68.137.170 with SMTP id qj10mr6261711pbb.31.1375969960855; Thu, 08 Aug 2013 06:52:40 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id x8sm14371721pbb.39.2013.08.08.06.52.36 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:52:40 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 31/35] cpufreq: sh: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:33 +0530 Message-Id: <59aad752560cd39629fa415382ba0fb0e4541ac6.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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130808_095302_451417_2176B3AC X-CRM114-Status: GOOD ( 11.71 ) X-Spam-Score: -2.6 (--) Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, Viresh Kumar , patches@linaro.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, Paul Mundt , 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(). Cc: Paul Mundt Cc: linux-sh@vger.kernel.org Signed-off-by: Viresh Kumar --- drivers/cpufreq/sh-cpufreq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/sh-cpufreq.c b/drivers/cpufreq/sh-cpufreq.c index ffc6d24..1362e88 100644 --- a/drivers/cpufreq/sh-cpufreq.c +++ b/drivers/cpufreq/sh-cpufreq.c @@ -120,9 +120,9 @@ static int sh_cpufreq_cpu_init(struct cpufreq_policy *policy) if (freq_table) { int result; - result = cpufreq_frequency_table_cpuinfo(policy, freq_table); - if (!result) - cpufreq_frequency_table_get_attr(freq_table, cpu); + result = cpufreq_table_validate_and_show(policy, freq_table); + if (result) + return result; } else { dev_notice(dev, "no frequency table found, falling back " "to rate rounding.\n");