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>
This commit is contained in:
parent
e654df7a1a
commit
52c47b6341
1 changed files with 7 additions and 6 deletions
|
@ -142,7 +142,7 @@ static int __init weim_parse_dt(struct platform_device *pdev,
|
||||||
&pdev->dev);
|
&pdev->dev);
|
||||||
const struct imx_weim_devtype *devtype = of_id->data;
|
const struct imx_weim_devtype *devtype = of_id->data;
|
||||||
struct device_node *child;
|
struct device_node *child;
|
||||||
int ret;
|
int ret, have_child = 0;
|
||||||
|
|
||||||
if (devtype == &imx50_weim_devtype) {
|
if (devtype == &imx50_weim_devtype) {
|
||||||
ret = imx_weim_gpr_setup(pdev);
|
ret = imx_weim_gpr_setup(pdev);
|
||||||
|
@ -155,13 +155,14 @@ static int __init weim_parse_dt(struct platform_device *pdev,
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ret = weim_timing_setup(child, base, devtype);
|
ret = weim_timing_setup(child, base, devtype);
|
||||||
if (ret) {
|
if (ret)
|
||||||
dev_err(&pdev->dev, "%s set timing failed.\n",
|
dev_warn(&pdev->dev, "%s set timing failed.\n",
|
||||||
child->full_name);
|
child->full_name);
|
||||||
return ret;
|
else
|
||||||
}
|
have_child = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (have_child)
|
||||||
ret = of_platform_populate(pdev->dev.of_node,
|
ret = of_platform_populate(pdev->dev.of_node,
|
||||||
of_default_bus_match_table,
|
of_default_bus_match_table,
|
||||||
NULL, &pdev->dev);
|
NULL, &pdev->dev);
|
||||||
|
|
Loading…
Add table
Reference in a new issue