diff options
author | Alison Chaiken <alison_chaiken@mentor.com> | 2015-02-18 23:24:10 -0800 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2015-03-02 21:47:59 +0800 |
commit | 52c47b63412b0946fcf3c04b5e152df41fc7eca5 (patch) | |
tree | dc7d910dd4f8a6055172d3c8b2dc91f7f54a970d /drivers/bus | |
parent | e654df7a1a4843429b5d1d6ee40cac9ecef75304 (diff) | |
download | linux-rt-52c47b63412b0946fcf3c04b5e152df41fc7eca5.tar.gz |
bus: imx-weim: improve error handling upon child probe-failure
Probe all children of the WEIM node, reporting any failures. Report
failure from parsing of WEIM node itself if probes of all children fail.
Signed-off-by: Alison Chaiken <alison_chaiken@mentor.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/imx-weim.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/bus/imx-weim.c b/drivers/bus/imx-weim.c index 0958b6981773..e98d15eaa799 100644 --- a/drivers/bus/imx-weim.c +++ b/drivers/bus/imx-weim.c @@ -142,7 +142,7 @@ static int __init weim_parse_dt(struct platform_device *pdev, &pdev->dev); const struct imx_weim_devtype *devtype = of_id->data; struct device_node *child; - int ret; + int ret, have_child = 0; if (devtype == &imx50_weim_devtype) { ret = imx_weim_gpr_setup(pdev); @@ -155,14 +155,15 @@ static int __init weim_parse_dt(struct platform_device *pdev, continue; ret = weim_timing_setup(child, base, devtype); - if (ret) { - dev_err(&pdev->dev, "%s set timing failed.\n", + if (ret) + dev_warn(&pdev->dev, "%s set timing failed.\n", child->full_name); - return ret; - } + else + have_child = 1; } - ret = of_platform_populate(pdev->dev.of_node, + if (have_child) + ret = of_platform_populate(pdev->dev.of_node, of_default_bus_match_table, NULL, &pdev->dev); if (ret) |