From patchwork Mon May 7 07:57:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ying-Chun Liu \(PaulLiu\)" X-Patchwork-Id: 8429 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 82BA223E42 for ; Mon, 7 May 2012 07:57:32 +0000 (UTC) Received: from mail-yw0-f52.google.com (mail-yw0-f52.google.com [209.85.213.52]) by fiordland.canonical.com (Postfix) with ESMTP id 46DD3A18692 for ; Mon, 7 May 2012 07:57:32 +0000 (UTC) Received: by yhpp61 with SMTP id p61so4937017yhp.11 for ; Mon, 07 May 2012 00:57:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :dkim-signature:sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=zuWzkp05XzdVTV4dI16eQjgVKh0jfXRg/C8IOq+XJBk=; b=lSLz3U5iHQr0NvAqwFIUOX7czmydgeFlacdxKAn2vArFxCYImZiZdY+yxjwLZiGFfZ IsbMXl64Po50MbLP7KgDPR0nTXJxOxbM0B6TKob6lkUWSed4DcMPbP+QH/mVsEN8dKAd 8h6xTiJzaiQdtmKAVpKK/ZT+YCWdMI3ROkygjuz0oZmxEjsDFAFeSv8iBmzKomuQvemY +uNiTNOjrb0GB1VWT09z4a9V7Dc2k+26qHxCw6p9fYTzDWEsecy3GsAQqZRgV1Qjx3S+ LUNXoZukdne+t2CbXvWH2d1G8rhH+bkWp72reFq2H23ZY1ONNXkrzuAmusCk+ulEoZPF qamw== Received: by 10.50.47.131 with SMTP id d3mr7712926ign.33.1336377451600; Mon, 07 May 2012 00:57:31 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.73.147 with SMTP id q19csp108663ibj; Mon, 7 May 2012 00:57:31 -0700 (PDT) Received: by 10.68.212.197 with SMTP id nm5mr19100185pbc.110.1336377450562; Mon, 07 May 2012 00:57:30 -0700 (PDT) Received: from mail-pz0-f50.google.com (mail-pz0-f50.google.com [209.85.210.50]) by mx.google.com with ESMTPS id s4si17115964pbc.285.2012.05.07.00.57.30 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 May 2012 00:57:30 -0700 (PDT) Received-SPF: pass (google.com: domain of grandpaul@gmail.com designates 209.85.210.50 as permitted sender) client-ip=209.85.210.50; Authentication-Results: mx.google.com; spf=pass (google.com: domain of grandpaul@gmail.com designates 209.85.210.50 as permitted sender) smtp.mail=grandpaul@gmail.com; dkim=pass header.i=@gmail.com Received: by danh15 with SMTP id h15so1201654dan.37 for ; Mon, 07 May 2012 00:57:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=zuWzkp05XzdVTV4dI16eQjgVKh0jfXRg/C8IOq+XJBk=; b=bGkgRwj3JiBHgBw9t5iAdzn0sImWGdWFuA3ATgB6fU1PzEKR3a7woFXg12rshvtzg+ odDAKrSB/wh6ZvQrePyZ5cO196L1TKKiDpi8ikwg0Ix/0G5CSHlbXtR9E6XQJi2KCjTX jVzSK1A18quGtZzPxGPXya5dcayyng2tVx/3F7KIpJjOF+mHapJs0bgyN/C9VuBQ8GAh HU/51YAedkzuwVElh7gBaPG+QgrRvurwM8ONjSpkLtZuTKgs22SvkodlfLHIlQkkuvJQ d0e+OxnwFTkMEoUd2Q+RoKIbaUwyQNP2pvAU+akJ+d1/v7R64hM1gmRW5WKC9z4aYoQQ eM/Q== Received: by 10.68.190.5 with SMTP id gm5mr450452pbc.21.1336377449976; Mon, 07 May 2012 00:57:29 -0700 (PDT) Received: from freya.lan (host-12.133-185-111.static.totalbb.net.tw. [111.185.133.12]) by mx.google.com with ESMTPS id wn3sm17507592pbc.74.2012.05.07.00.57.26 (version=SSLv3 cipher=OTHER); Mon, 07 May 2012 00:57:28 -0700 (PDT) Sender: PaulLiu From: "Ying-Chun Liu (PaulLiu)" To: linux-kernel@vger.kernel.org Cc: patches@linaro.org, Liam Girdwood , Mark Brown , "Ying-Chun Liu (PaulLiu)" Subject: [PATCH] regulator: da9052: fix bug in device tree iteration loop Date: Mon, 7 May 2012 15:57:23 +0800 Message-Id: <1336377443-5926-1-git-send-email-paulliu@debian.org> X-Mailer: git-send-email 1.7.10 X-Gm-Message-State: ALoCoQnNcS5jpnUiD0nG/s2ioLFEEQyoMe3SSuyZv6692QocfBKkle8VfOd+fD27z3aKe2/KhQtq From: "Ying-Chun Liu (PaulLiu)" The driver of da9052 is buggy due to the iteration loop of device tree. This patch fix the loop condition to make the driver work with device tree. Signed-off-by: Ying-Chun Liu (PaulLiu) --- drivers/regulator/da9052-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c index eaa91cc5..f8ad24a 100644 --- a/drivers/regulator/da9052-regulator.c +++ b/drivers/regulator/da9052-regulator.c @@ -444,7 +444,7 @@ static int __devinit da9052_regulator_probe(struct platform_device *pdev) if (!nproot) return -ENODEV; - for (np = of_get_next_child(nproot, NULL); !np; + for (np = of_get_next_child(nproot, NULL); np; np = of_get_next_child(nproot, np)) { if (!of_node_cmp(np->name, regulator->info->reg_desc.name)) {