diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2018-03-08 17:52:08 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-03-08 17:52:08 +0300 |
commit | 422caa5f7a455920369039d04c6070eb50d6146b (patch) | |
tree | 8667d9587c412ee25660184f6e943ed10e445bc0 /drivers/soc/imx/gpc.c | |
parent | 8a331f4a0863bea758561c921b94b4d28f7c4029 (diff) | |
parent | b3b7c4795ccab5be71f080774c45bbbcc75c2aaf (diff) | |
download | linux-422caa5f7a455920369039d04c6070eb50d6146b.tar.xz |
Merge branch 'ras/urgent' into ras/core
Pick up urgent fixes to apply further development changes.
Diffstat (limited to 'drivers/soc/imx/gpc.c')
-rw-r--r-- | drivers/soc/imx/gpc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/soc/imx/gpc.c b/drivers/soc/imx/gpc.c index 53f7275d6cbd..750f93197411 100644 --- a/drivers/soc/imx/gpc.c +++ b/drivers/soc/imx/gpc.c @@ -348,7 +348,7 @@ static int imx_gpc_old_dt_init(struct device *dev, struct regmap *regmap, if (i == 1) { domain->supply = devm_regulator_get(dev, "pu"); if (IS_ERR(domain->supply)) - return PTR_ERR(domain->supply);; + return PTR_ERR(domain->supply); ret = imx_pgc_get_clocks(dev, domain); if (ret) @@ -470,13 +470,21 @@ static int imx_gpc_probe(struct platform_device *pdev) static int imx_gpc_remove(struct platform_device *pdev) { + struct device_node *pgc_node; int ret; + pgc_node = of_get_child_by_name(pdev->dev.of_node, "pgc"); + + /* bail out if DT too old and doesn't provide the necessary info */ + if (!of_property_read_bool(pdev->dev.of_node, "#power-domain-cells") && + !pgc_node) + return 0; + /* * If the old DT binding is used the toplevel driver needs to * de-register the power domains */ - if (!of_get_child_by_name(pdev->dev.of_node, "pgc")) { + if (!pgc_node) { of_genpd_del_provider(pdev->dev.of_node); ret = pm_genpd_remove(&imx_gpc_domains[GPC_PGC_DOMAIN_PU].base); |