From: Daniel Thompson <daniel.thompson@linaro.org>
To: Johan Hovold <johan@kernel.org>, Lee Jones <lee.jones@linaro.org>
Cc: Jingoo Han <jingoohan1@gmail.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org, stable <stable@vger.kernel.org>,
Matthias Kaehlcke <matthias@kaehlcke.net>
Subject: Re: [PATCH v2 3/4] backlight: tps65217_bl: fix device-tree node lookup
Date: Mon, 20 Nov 2017 11:34:07 +0000 [thread overview]
Message-ID: <6effdc1a-9c3d-a773-04e4-e6c3ea8f4f52@linaro.org> (raw)
In-Reply-To: <20171120104547.2639-4-johan@kernel.org>
On 20/11/17 10:45, Johan Hovold wrote:
> 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 <stable@vger.kernel.org> # 3.7
> Cc: Matthias Kaehlcke <matthias@kaehlcke.net>
> Signed-off-by: Johan Hovold <johan@kernel.org>
Didn't I already ack this one?
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
> ---
> 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);
>
>
next prev parent reply other threads:[~2017-11-20 11:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20171120104547.2639-1-johan@kernel.org>
2017-11-20 10:45 ` [PATCH v2 1/4] backlight: as3711_bl: fix device-tree node lookup Johan Hovold
2017-11-20 11:33 ` Daniel Thompson
2017-11-29 11:28 ` Lee Jones
2017-11-20 10:45 ` [PATCH v2 2/4] backlight: max8925_bl: " Johan Hovold
2017-11-20 11:33 ` Daniel Thompson
2017-11-29 11:29 ` Lee Jones
2017-11-20 10:45 ` [PATCH v2 3/4] backlight: tps65217_bl: " Johan Hovold
2017-11-20 11:34 ` Daniel Thompson [this message]
2017-11-20 11:44 ` Johan Hovold
2017-11-29 11:29 ` Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6effdc1a-9c3d-a773-04e4-e6c3ea8f4f52@linaro.org \
--to=daniel.thompson@linaro.org \
--cc=b.zolnierkie@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jingoohan1@gmail.com \
--cc=johan@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthias@kaehlcke.net \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).