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: 2841151 X-Patchwork-Delegate: lethal@linux-sh.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A1EAA9F271 for ; Thu, 8 Aug 2013 13:54:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 938442035C for ; Thu, 8 Aug 2013 13:54:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 755B2202DB for ; Thu, 8 Aug 2013 13:54:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965723Ab3HHNwo (ORCPT ); Thu, 8 Aug 2013 09:52:44 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:50005 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965702Ab3HHNwl (ORCPT ); Thu, 8 Aug 2013 09:52:41 -0400 Received: by mail-pa0-f51.google.com with SMTP id lf1so649266pab.38 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=k7//wzTXGZCnELIR4LkF3JclJHjnl8vGqFpTrDJO1xAYu0Db+SGsKdmVfIHcd48E+r Cx78EJAQ0smMNcJCy2u3v0Wg0HaAn8VYmdbIvvXtf5TamoQfgc/ABL1kudaTuvjzTGEg S8QZamm6ppppXie5eqJ4vDVkJ5PPntoJ1/pJlO37bPtLxDilVfakEHxUB7jbWDCqEri+ 5rzAVLUxfoXCwZj6qKOYbp1QAkVlzoxW1YPfkuK7C8asWVVjluObX9jqPguyDRY6D3Bf ++lm/M97RO3jjYDyEWGyYRv5ZxYiYnPgKoVCOxLAvchTAVV410/B9YAOhgKEV85llotC CrAQ== X-Gm-Message-State: ALoCoQmA2nlj98lfLIPIRmaqXxPJn1F13qlpSJEpjvb1XitnATvdLkDnEctux13pIBn8HYGMtiEm 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 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 , Paul Mundt , linux-sh@vger.kernel.org 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: Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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");