diff options
author | Thomas Abraham <thomas.ab@samsung.com> | 2013-03-26 11:12:32 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-04-09 04:13:59 -0400 |
commit | f9819739427e6049d2d318743a4a25817018afd4 (patch) | |
tree | e20c54b3e58bf9a8f9314f3124f1db780b141203 /drivers/pinctrl/pinctrl-exynos5440.c | |
parent | 2e8ff91a5b86952beb45619734a05247d57baf09 (diff) |
pinctrl: exynos5440: fix probe failure due to missing pin-list in config nodes
The property 'samsung,exynos5440-pins' is optional in configuration nodes
which are included in the Exynos5440 pin-controller device node. Fix the
incorrect failure in driver probe if 'samsung,exynos5440-pins' property
is not found in the configuration nodes.
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-exynos5440.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-exynos5440.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-exynos5440.c b/drivers/pinctrl/pinctrl-exynos5440.c index eb8e502e11ef..7126b7db86c5 100644 --- a/drivers/pinctrl/pinctrl-exynos5440.c +++ b/drivers/pinctrl/pinctrl-exynos5440.c | |||
@@ -670,8 +670,10 @@ static int exynos5440_pinctrl_parse_dt(struct platform_device *pdev, | |||
670 | 670 | ||
671 | ret = exynos5440_pinctrl_parse_dt_pins(pdev, cfg_np, | 671 | ret = exynos5440_pinctrl_parse_dt_pins(pdev, cfg_np, |
672 | &pin_list, &npins); | 672 | &pin_list, &npins); |
673 | if (ret) | 673 | if (ret) { |
674 | return ret; | 674 | gname = NULL; |
675 | goto skip_to_pin_function; | ||
676 | } | ||
675 | 677 | ||
676 | /* derive pin group name from the node name */ | 678 | /* derive pin group name from the node name */ |
677 | gname = devm_kzalloc(dev, strlen(cfg_np->name) + GSUFFIX_LEN, | 679 | gname = devm_kzalloc(dev, strlen(cfg_np->name) + GSUFFIX_LEN, |
@@ -687,6 +689,7 @@ static int exynos5440_pinctrl_parse_dt(struct platform_device *pdev, | |||
687 | grp->num_pins = npins; | 689 | grp->num_pins = npins; |
688 | grp++; | 690 | grp++; |
689 | 691 | ||
692 | skip_to_pin_function: | ||
690 | ret = of_property_read_u32(cfg_np, "samsung,exynos5440-pin-function", | 693 | ret = of_property_read_u32(cfg_np, "samsung,exynos5440-pin-function", |
691 | &function); | 694 | &function); |
692 | if (ret) | 695 | if (ret) |
@@ -709,7 +712,7 @@ static int exynos5440_pinctrl_parse_dt(struct platform_device *pdev, | |||
709 | return -ENOMEM; | 712 | return -ENOMEM; |
710 | } | 713 | } |
711 | func->groups[0] = gname; | 714 | func->groups[0] = gname; |
712 | func->num_groups = 1; | 715 | func->num_groups = gname ? 1 : 0; |
713 | func->function = function; | 716 | func->function = function; |
714 | func++; | 717 | func++; |
715 | func_idx++; | 718 | func_idx++; |