From patchwork Tue Feb 11 16:24:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Cartwright X-Patchwork-Id: 3628111 Return-Path: X-Original-To: patchwork-linux-pm@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 145F2BF418 for ; Tue, 11 Feb 2014 16:33:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C244201CD for ; Tue, 11 Feb 2014 16:33:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F8622014A for ; Tue, 11 Feb 2014 16:33:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752149AbaBKQ0a (ORCPT ); Tue, 11 Feb 2014 11:26:30 -0500 Received: from smtp.codeaurora.org ([198.145.11.231]:46704 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752073AbaBKQ02 (ORCPT ); Tue, 11 Feb 2014 11:26:28 -0500 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id C83B313F306; Tue, 11 Feb 2014 16:26:27 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id B9F0813F308; Tue, 11 Feb 2014 16:26:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from joshc.qualcomm.com (rrcs-67-52-129-61.west.biz.rr.com [67.52.129.61]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: joshc@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4E88213F2FF; Tue, 11 Feb 2014 16:26:27 +0000 (UTC) Received: by joshc.qualcomm.com (Postfix, from userid 1000) id 2D36061408; Tue, 11 Feb 2014 10:24:09 -0600 (CST) From: Josh Cartwright To: "Rafael J. Wysocki" , Viresh Kumar Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 8/8] cpufreq: ppc: make use of of_find_matching_node_and_match Date: Tue, 11 Feb 2014 10:24:06 -0600 Message-Id: <1392135847-30791-9-git-send-email-joshc@codeaurora.org> X-Mailer: git-send-email 1.8.5.4 In-Reply-To: <1392135847-30791-1-git-send-email-joshc@codeaurora.org> References: <1392135847-30791-1-git-send-email-joshc@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Instead of the of_find_matching_node()/of_match_node() pair, which requires two iterations through the match table, make use of of_find_matching_node_and_match(), which only iterates through the table once. Signed-off-by: Josh Cartwright Acked-by: Viresh Kumar --- drivers/cpufreq/ppc-corenet-cpufreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c b/drivers/cpufreq/ppc-corenet-cpufreq.c index 051000f..041ef3a 100644 --- a/drivers/cpufreq/ppc-corenet-cpufreq.c +++ b/drivers/cpufreq/ppc-corenet-cpufreq.c @@ -278,7 +278,7 @@ static int __init ppc_corenet_cpufreq_init(void) const struct soc_data *data; unsigned int cpu; - np = of_find_matching_node(NULL, node_matches); + np = of_find_matching_node_and_match(NULL, node_matches, &match); if (!np) return -ENODEV; @@ -288,7 +288,6 @@ static int __init ppc_corenet_cpufreq_init(void) cpumask_copy(per_cpu(cpu_mask, cpu), cpu_core_mask(cpu)); } - match = of_match_node(node_matches, np); data = match->data; if (data) { if (data->flag)