Commit a05f5d0e authored by Lad Prabhakar's avatar Lad Prabhakar Committed by 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: default avatarLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
parent 2702c9be
...@@ -274,7 +274,7 @@ static int ktd2692_parse_dt(struct ktd2692_context *led, struct device *dev, ...@@ -274,7 +274,7 @@ static int ktd2692_parse_dt(struct ktd2692_context *led, struct device *dev,
struct device_node *child_node; struct device_node *child_node;
int ret; int ret;
if (!dev_of_node(dev)) if (!np)
return -ENXIO; return -ENXIO;
led->ctrl_gpio = devm_gpiod_get(dev, "ctrl", GPIOD_ASIS); led->ctrl_gpio = devm_gpiod_get(dev, "ctrl", GPIOD_ASIS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment