提交 a05f5d0e 编写于 作者: L Lad Prabhakar 提交者: Pavel Machek

leds: ktd2692: Drop calling dev_of_node() in ktd2692_parse_dt

output of dev_of_node() is already assigned to "np" variable in
ktd2692_parse_dt(). Use "np" variable to check if OF node is NULL
instead of calling dev_of_node() again.
Signed-off-by: NLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: NPavel Machek <pavel@ucw.cz>
上级 2702c9be
......@@ -274,7 +274,7 @@ static int ktd2692_parse_dt(struct ktd2692_context *led, struct device *dev,
struct device_node *child_node;
int ret;
if (!dev_of_node(dev))
if (!np)
return -ENXIO;
led->ctrl_gpio = devm_gpiod_get(dev, "ctrl", GPIOD_ASIS);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册