From patchwork Thu Aug 8 13:48:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 2841277 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 8A01BBF546 for ; Thu, 8 Aug 2013 15:10:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6AF3F202F6 for ; Thu, 8 Aug 2013 15:10:09 +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 F3A8120527 for ; Thu, 8 Aug 2013 15:10:07 +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 1V7Qdd-0004Iy-Bz; Thu, 08 Aug 2013 13:52:27 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Qcn-0004Tz-3B; Thu, 08 Aug 2013 13:51:33 +0000 Received: from mail-pb0-f46.google.com ([209.85.160.46]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V7Qbr-0004FY-HZ for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2013 13:50:36 +0000 Received: by mail-pb0-f46.google.com with SMTP id rq2so3264616pbb.33 for ; Thu, 08 Aug 2013 06:50:14 -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=7MOdLCiX//MoPjXxqNhdKXco/akYEwKYLcCoIcP5FPs=; b=N0sRQsE3HW1H9URSSuQVlaF3RVG91pWiUfOqXeL7ANTIQHL7Bmu7nH00QYuTx0fab/ LHxEiUsBCdUX0b941pjmRLEzsCA+HlZw5Wp3fwywI75pO48V7DSHaePnkmtR+Ex6r6vS e4k/h45j7urPxSIswVldmZm1PNg5TP+4i1Fc3LfJdKMmpxX+WHnC5xl0NFAb8w8LDGxr H7YsNKwfWK9YGpdLPLwZs75VRGP6olxA0vly2wypCnY3EewLVJX4bmDN8dRMEqsbKk5T NY6yxloUzd0sUR24gRBs3XBAvhEDzbXmePuUZVGnWBDjwd+A0ljNeYm1Q7S4jJj3JsQA 5g5Q== X-Gm-Message-State: ALoCoQnKxUAbnABi70E4El+geOrgkVBh2L+U7sE0Bq3oFnc8l7PPv9xL6q7xqAed7qKYCLYyh6jy X-Received: by 10.68.131.133 with SMTP id om5mr6157689pbb.148.1375969814396; Thu, 08 Aug 2013 06:50:14 -0700 (PDT) Received: from localhost ([122.172.193.46]) by mx.google.com with ESMTPSA id yg1sm14420774pbb.1.2013.08.08.06.50.10 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 08 Aug 2013 06:50:13 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Subject: [PATCH 11/35] cpufreq: dbx500: use cpufreq_table_validate_and_show() Date: Thu, 8 Aug 2013 19:18:13 +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_095035_698644_0CF81470 X-CRM114-Status: GOOD ( 10.13 ) X-Spam-Score: -2.6 (--) Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Viresh Kumar , Linus Walleij , 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(). Cc: Linus Walleij Signed-off-by: Viresh Kumar Acked-by: Linus Walleij --- drivers/cpufreq/dbx500-cpufreq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/dbx500-cpufreq.c b/drivers/cpufreq/dbx500-cpufreq.c index 26321cd..ea03b92 100644 --- a/drivers/cpufreq/dbx500-cpufreq.c +++ b/drivers/cpufreq/dbx500-cpufreq.c @@ -87,10 +87,8 @@ static int dbx500_cpufreq_init(struct cpufreq_policy *policy) int res; /* get policy fields based on the table */ - res = cpufreq_frequency_table_cpuinfo(policy, freq_table); - if (!res) - cpufreq_frequency_table_get_attr(freq_table, policy->cpu); - else { + res = cpufreq_table_validate_and_show(policy, freq_table); + if (res) pr_err("dbx500-cpufreq: Failed to read policy table\n"); return res; }