aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinconf-generic.c
diff options
context:
space:
mode:
authorHeiko Stübner <heiko@sntech.de>2013-06-14 11:43:21 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-06-17 12:18:31 -0400
commite4a8844c04c00a1a64c6779692e1baff3851c1f7 (patch)
tree3ba79a4fd0c9813749b555f680d0fbc7a36f94e6 /drivers/pinctrl/pinconf-generic.c
parent9ee1f7d266aa1e2bfeb20cb5d4ac299c8e8ef8c7 (diff)
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: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinconf-generic.c')
-rw-r--r--drivers/pinctrl/pinconf-generic.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index dcf03714de90..ea9da1752252 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -208,6 +208,13 @@ int pinconf_generic_parse_dt_config(struct device_node *np,
208 ncfg++; 208 ncfg++;
209 } 209 }
210 210
211 /* no configs found at all */
212 if (ncfg == 0) {
213 *configs = NULL;
214 *nconfigs = 0;
215 return 0;
216 }
217
211 /* 218 /*
212 * Now limit the number of configs to the real number of 219 * Now limit the number of configs to the real number of
213 * found properties. 220 * found properties.