From patchwork Tue Dec 4 05:16:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 203557 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 3B7432C0131 for ; Tue, 4 Dec 2012 16:17:05 +1100 (EST) Received: from mail-qa0-f44.google.com (mail-qa0-f44.google.com [209.85.216.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id B1A822C0090; Tue, 4 Dec 2012 16:16:21 +1100 (EST) Received: by mail-qa0-f44.google.com with SMTP id z4so569982qan.17 for ; Mon, 03 Dec 2012 21:16:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=muA6CJBuJ1zm1pBH4XZI1lONTwYH8FH4NBywHNjin0g=; b=l4g94iyhxzdYslvCGKPNvYXJclbsPXf2K2AB1L85AjIwDPKUVPqVgaW5baex5nb3/9 NKy9vgu554x1NvjVZmQ5Y3l+HDQDNlo9owWXakNcHpm1ylbAI+GuBoQNuuLcvtmYtHIC MeSy/1cj7cWxMA2WUeGaO7WZcfKk36l4CAp2tgH2CXn/Z5KfPbqQl+Ybx9UpS2uecG05 XytM+XfFv6Ntk2uiETWFt5NmkSYjqUA20GXSsfX8vVw003wtnJGj8S5YO7pUxEo23mzO H1Pb5TTnR4Rd9g2piE4wmSoMdKfqDvZ5VzVwt1Ot0GZJjdKUpDmrSGyQs8OWeYs0lyYd vLeA== MIME-Version: 1.0 Received: by 10.224.59.197 with SMTP id m5mr21259073qah.4.1354598178475; Mon, 03 Dec 2012 21:16:18 -0800 (PST) Received: by 10.229.126.165 with HTTP; Mon, 3 Dec 2012 21:16:18 -0800 (PST) Date: Tue, 4 Dec 2012 00:16:18 -0500 Message-ID: Subject: [PATCH -next] TTY: hvsi: use for_each_compatible_node() macro From: Wei Yongjun To: gregkh@linuxfoundation.org, grant.likely@secretlab.ca, rob.herring@calxeda.com Cc: yongjun_wei@trendmicro.com.cn, linuxppc-dev@lists.ozlabs.org, devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Wei Yongjun Use for_each_compatible_node() macro instead of open coding it. Signed-off-by: Wei Yongjun Acked-by: Grant Likely --- drivers/tty/hvc/hvsi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty/hvc/hvsi.c b/drivers/tty/hvc/hvsi.c index 5b95b4f..70e0ef7 100644 --- a/drivers/tty/hvc/hvsi.c +++ b/drivers/tty/hvc/hvsi.c @@ -1187,9 +1187,7 @@ static int __init hvsi_console_init(void) hvsi_wait = poll_for_state; /* no irqs yet; must poll */ /* search device tree for vty nodes */ - for (vty = of_find_compatible_node(NULL, "serial", "hvterm-protocol"); - vty != NULL; - vty = of_find_compatible_node(vty, "serial", "hvterm-protocol")) { + for_each_compatible_node(vty, "serial", "hvterm-protocol") { struct hvsi_struct *hp; const uint32_t *vtermno, *irq;