From patchwork Mon Nov 13 10:20:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 10056345 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F2DB860365 for ; Mon, 13 Nov 2017 15:48:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E410829321 for ; Mon, 13 Nov 2017 15:48:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D910629429; Mon, 13 Nov 2017 15:48:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7264929419 for ; Mon, 13 Nov 2017 15:48:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 451706E660; Mon, 13 Nov 2017 15:48:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x242.google.com (mail-lf0-x242.google.com [IPv6:2a00:1450:4010:c07::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6FAD56E53C for ; Mon, 13 Nov 2017 10:20:51 +0000 (UTC) Received: by mail-lf0-x242.google.com with SMTP id f134so9375259lfg.8 for ; Mon, 13 Nov 2017 02:20:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=dQJsqzy0QPJhWYhKnZgrGvhi7mHAzS1a8ouC1aXoAwY=; b=GGVgT+bFtUPX8Qdwx/mw4x1Of08Xvauu2t45wgihUlosTtouFNzEJREGdBc/f2Zd+Y XBRjCnVGIujYBO+0L+4G0M6CuSXbjfLlUxIfOgw+L2ZY0TrohhYfwbXpbbQb/Z8bRTZ/ 5VDYAruRNlZ2FGjkxTbYWKyefW7D3cLtyKapQHmlKJrEoxhd/SdfJddhylSsXIY/vKqD hrYQyXqFSClN/yIFqBcQ2hy/iLJQOJJFIDD7sWpiCiHF+jaGoFru34dTNT8rTTapqs3v No4AjDmsdlenzZEf1UqHKiGlx8hScQV2/JjaidDmNyt8KSp8SHXiBljjtLdFxvpi0YxO /PrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=dQJsqzy0QPJhWYhKnZgrGvhi7mHAzS1a8ouC1aXoAwY=; b=e5kChlqUF2E9ftDYoirXkpPLvXnYGK4fdQ/TKgaCX9lE0aLfn0vGwKfhaPvwWMQ2FJ sGxTvPUWjzPHeuTbU2GoLPjWjyXyMUSJzKdO/XXgkMLbbm/+GF3ecMrfckmu1VxsyGto SxxZJ3D4m1LucHyyuBAetCSjQF9IGMNUzi9EqBGpIdGSUDxEYtMIfE7gGdHH4FxltJua YaQMbXqx/2ZzGKk2aBZKSb+URq7IIlxTsKK+9bcRCdLve8q4Z2VUKOQn70aRSSYX8JUa vRsoCXABLeY0ramHqQnTKlVOlub/KJF7k7rTWnAO8Xj4hVEypxr/GXv48nho98SP+g6+ h3rw== X-Gm-Message-State: AJaThX7xDPnJe0tfSJXZdS+49p1Mq/aA3EXezkcBQzYXFAtaY3MautVE CGYaR1H10Xzyu2c4NE3ryHY= X-Google-Smtp-Source: AGs4zMZaeW1OATxd4BlOZP/jeQ6k6CfnTXi4UOPw0gShkW2p5wxRBwDPsNEPFy5k3Axhn7aDQ3ls8Q== X-Received: by 10.46.71.82 with SMTP id u79mr3032371lja.52.1510568449780; Mon, 13 Nov 2017 02:20:49 -0800 (PST) Received: from xi.terra (c-c0bae655.07-184-6d6c6d4.cust.bredbandsbolaget.se. [85.230.186.192]) by smtp.gmail.com with ESMTPSA id s76sm2818192lfi.56.2017.11.13.02.20.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Nov 2017 02:20:48 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.89) (envelope-from ) id 1eEBrK-0002RY-Dc; Mon, 13 Nov 2017 11:20:54 +0100 From: Johan Hovold To: Lee Jones Subject: [PATCH 3/3] backlight: tps65217_bl: fix device-tree node lookup Date: Mon, 13 Nov 2017 11:20:49 +0100 Message-Id: <20171113102049.9342-3-johan@kernel.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171113102049.9342-1-johan@kernel.org> References: <20171113102049.9342-1-johan@kernel.org> X-Mailman-Approved-At: Mon, 13 Nov 2017 15:48:14 +0000 Cc: Daniel Thompson , Jingoo Han , Johan Hovold , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, stable , linux-fbdev@vger.kernel.org, Matthias Kaehlcke X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Fix child-node lookup during probe, which ended up searching the whole device tree depth-first starting at the parent rather than just matching on its children. This would only cause trouble if the child node is missing while there is an unrelated node named "backlight" elsewhere in the tree. Fixes: eebfdc17cc6c ("backlight: Add TPS65217 WLED driver") Cc: stable # 3.7 Cc: Matthias Kaehlcke Signed-off-by: Johan Hovold --- drivers/video/backlight/tps65217_bl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/backlight/tps65217_bl.c b/drivers/video/backlight/tps65217_bl.c index 380917c86276..762e3feed097 100644 --- a/drivers/video/backlight/tps65217_bl.c +++ b/drivers/video/backlight/tps65217_bl.c @@ -184,11 +184,11 @@ static struct tps65217_bl_pdata * tps65217_bl_parse_dt(struct platform_device *pdev) { struct tps65217 *tps = dev_get_drvdata(pdev->dev.parent); - struct device_node *node = of_node_get(tps->dev->of_node); + struct device_node *node; struct tps65217_bl_pdata *pdata, *err; u32 val; - node = of_find_node_by_name(node, "backlight"); + node = of_get_child_by_name(tps->dev->of_node, "backlight"); if (!node) return ERR_PTR(-ENODEV);