From patchwork Mon Nov 20 10:45:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 10067747 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 13F2F6022E for ; Tue, 21 Nov 2017 08:39:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01C4D28F43 for ; Tue, 21 Nov 2017 08:39:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EAD1A28F80; Tue, 21 Nov 2017 08:39:25 +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 855DD28F43 for ; Tue, 21 Nov 2017 08:39:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A4586E36D; Tue, 21 Nov 2017 08:39:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x241.google.com (mail-lf0-x241.google.com [IPv6:2a00:1450:4010:c07::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 431006E169 for ; Mon, 20 Nov 2017 10:45:58 +0000 (UTC) Received: by mail-lf0-x241.google.com with SMTP id o41so9526552lfi.2 for ; Mon, 20 Nov 2017 02:45:58 -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=OczqXz/Kw+hhRz60d43M4afO9ixyBZij4qYnSP1NtDxfSgIAggRdzX77ED4COMEDmq tY7UxZXYQXh1fNC0QJ2c55H9TJgXCXewYcFARX0L285yhlvQXkyKmTRrntXhXCUtevpz BEY1l4YselErPgMFNEdMEdTPYJWkm85a9Aq3AEnzLsKdy/8TtazvBNpMLJBs2t9IIC/t 1fkPTXA+QDIlPUQHfZ133jxUgU+Dyy2zLc5jm4Blv8dYYUTqBWMBy/7Pbre08OcnyiLH kmSsjiLY51gagrvmNbYrGVyflm5z+qf8H49FMp/+gNkp+S3L2Kx93vb/MXzw8QDwNbhm QP9g== 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=FVAG1CSrENc7c/YDFZitwBgu/vUrL6NlTJxfuLjRroN4GUZmXymRaRHI3h1tkRvHFl mTcJQa5LQjNBV+pzAiH+uYkmRMCDMGPXRmTyv0WZd8uSvdiJua3WIMFa5sg5LH/4X8Rv yM6Wa9pyhYGTyO1GF7PNN4xWy98x5Jq1/y0NBW9h84LMBySm3UDXs15plgz2pdvL/k9x MyIaws5/HAdlEEJRzTftVtXyWrVzYaDBx+xR++gg/4z5xbmq6n6vdqtik+arvx/6/Q+7 osoHxUDrV7j3/50pzXavjOM76kXxow//WJwb4weDNMc1iH3gzaiJPECgJxSYRCOThBT+ qSDQ== X-Gm-Message-State: AJaThX6yofbYhSS4tuJwitZxPIwaNrvVgvtkBKaP/YRBoE3mtjyj8Fcb U1/ySLzlU8cvkejm4NzZ6QY= X-Google-Smtp-Source: AGs4zMbWrW3a47g3p5L5HRjIOK3Qbfg2bfMOTucz0/3ewOEmwNgWJ4Sg7yiYkQIKiGurZN7tpSVvyA== X-Received: by 10.46.46.3 with SMTP id u3mr4039127lju.117.1511174756582; Mon, 20 Nov 2017 02:45:56 -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 t76sm1882113lff.84.2017.11.20.02.45.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Nov 2017 02:45:54 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.89) (envelope-from ) id 1eGjaK-0000hh-54; Mon, 20 Nov 2017 11:45:52 +0100 From: Johan Hovold To: Lee Jones Subject: [PATCH v2 3/4] backlight: tps65217_bl: fix device-tree node lookup Date: Mon, 20 Nov 2017 11:45:46 +0100 Message-Id: <20171120104547.2639-4-johan@kernel.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171120104547.2639-1-johan@kernel.org> References: <20171120104547.2639-1-johan@kernel.org> X-Mailman-Approved-At: Tue, 21 Nov 2017 08:39:20 +0000 Cc: Daniel Thompson , Bartlomiej Zolnierkiewicz , Jingoo Han , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Johan Hovold , 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);