summaryrefslogtreecommitdiffstats
path: root/drivers/pmdomain/imx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:11:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:11:40 +0000
commit8b0a8165cdad0f4133837d753649ef4682e42c3b (patch)
tree5c58f869f31ddb1f7bd6e8bdea269b680b36c5b6 /drivers/pmdomain/imx
parentReleasing progress-linux version 6.8.12-1~progress7.99u1. (diff)
downloadlinux-8b0a8165cdad0f4133837d753649ef4682e42c3b.tar.xz
linux-8b0a8165cdad0f4133837d753649ef4682e42c3b.zip
Merging upstream version 6.9.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/pmdomain/imx')
-rw-r--r--drivers/pmdomain/imx/imx8m-blk-ctrl.c9
-rw-r--r--drivers/pmdomain/imx/imx8mp-blk-ctrl.c9
-rw-r--r--drivers/pmdomain/imx/scu-pd.c2
3 files changed, 13 insertions, 7 deletions
diff --git a/drivers/pmdomain/imx/imx8m-blk-ctrl.c b/drivers/pmdomain/imx/imx8m-blk-ctrl.c
index 1341a707f6..ca942d7929 100644
--- a/drivers/pmdomain/imx/imx8m-blk-ctrl.c
+++ b/drivers/pmdomain/imx/imx8m-blk-ctrl.c
@@ -258,11 +258,14 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
domain->power_dev =
dev_pm_domain_attach_by_name(dev, data->gpc_name);
- if (IS_ERR(domain->power_dev)) {
- dev_err_probe(dev, PTR_ERR(domain->power_dev),
+ if (IS_ERR_OR_NULL(domain->power_dev)) {
+ if (!domain->power_dev)
+ ret = -ENODEV;
+ else
+ ret = PTR_ERR(domain->power_dev);
+ dev_err_probe(dev, ret,
"failed to attach power domain \"%s\"\n",
data->gpc_name);
- ret = PTR_ERR(domain->power_dev);
goto cleanup_pds;
}
diff --git a/drivers/pmdomain/imx/imx8mp-blk-ctrl.c b/drivers/pmdomain/imx/imx8mp-blk-ctrl.c
index a56f7f92d0..77e889165e 100644
--- a/drivers/pmdomain/imx/imx8mp-blk-ctrl.c
+++ b/drivers/pmdomain/imx/imx8mp-blk-ctrl.c
@@ -687,11 +687,14 @@ static int imx8mp_blk_ctrl_probe(struct platform_device *pdev)
domain->power_dev =
dev_pm_domain_attach_by_name(dev, data->gpc_name);
- if (IS_ERR(domain->power_dev)) {
- dev_err_probe(dev, PTR_ERR(domain->power_dev),
+ if (IS_ERR_OR_NULL(domain->power_dev)) {
+ if (!domain->power_dev)
+ ret = -ENODEV;
+ else
+ ret = PTR_ERR(domain->power_dev);
+ dev_err_probe(dev, ret,
"failed to attach power domain %s\n",
data->gpc_name);
- ret = PTR_ERR(domain->power_dev);
goto cleanup_pds;
}
diff --git a/drivers/pmdomain/imx/scu-pd.c b/drivers/pmdomain/imx/scu-pd.c
index 891c1d925a..05841b0bf7 100644
--- a/drivers/pmdomain/imx/scu-pd.c
+++ b/drivers/pmdomain/imx/scu-pd.c
@@ -393,7 +393,7 @@ static int imx_sc_pd_power_off(struct generic_pm_domain *domain)
return imx_sc_pd_power(domain, false);
}
-static struct generic_pm_domain *imx_scu_pd_xlate(struct of_phandle_args *spec,
+static struct generic_pm_domain *imx_scu_pd_xlate(const struct of_phandle_args *spec,
void *data)
{
struct generic_pm_domain *domain = ERR_PTR(-ENOENT);