提交 e4a8844c 编写于 作者: H Heiko Stübner 提交者: Linus Walleij

pinctrl: handle zero found dt pinconfig properties better

This adds a shortcut when no valid pinconf properties are found
in the parsed dt node, to set the values immediately and return.
Suggested-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
Reviewed-by: NJames Hogan <james.hogan@imgtec.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 9ee1f7d2
......@@ -208,6 +208,13 @@ int pinconf_generic_parse_dt_config(struct device_node *np,
ncfg++;
}
/* no configs found at all */
if (ncfg == 0) {
*configs = NULL;
*nconfigs = 0;
return 0;
}
/*
* Now limit the number of configs to the real number of
* found properties.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册