diff options
author | Dan Williams <dan.j.williams@intel.com> | 2023-04-04 15:37:25 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2023-04-04 15:37:25 -0700 |
commit | ca712e47054678c5ce93a0e0f686353ad5561195 (patch) | |
tree | 575dd9f2e541ddd74b72e82dfe69c5badcb9e281 /drivers/interconnect/imx/imx.c | |
parent | 24b18197184ac39bb8566fb82c0bf788bcd0d45b (diff) | |
parent | abf04be0e7071f2bcd39bf97ba407e7d4439785e (diff) |
Merge branch 'for-6.3/cxl-doe-fixes' into for-6.3/cxl
Pick up the fixes (first 6 patches) from the DOE rework series from
Lukas for v6.3-rc.
Link: https://lore.kernel.org/all/cover.1678543498.git.lukas@wunner.de/
Diffstat (limited to 'drivers/interconnect/imx/imx.c')
-rw-r--r-- | drivers/interconnect/imx/imx.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c index 823d9be9771a..979ed610f704 100644 --- a/drivers/interconnect/imx/imx.c +++ b/drivers/interconnect/imx/imx.c @@ -295,6 +295,9 @@ int imx_icc_register(struct platform_device *pdev, provider->xlate = of_icc_xlate_onecell; provider->data = data; provider->dev = dev->parent; + + icc_provider_init(provider); + platform_set_drvdata(pdev, imx_provider); if (settings) { @@ -306,20 +309,18 @@ int imx_icc_register(struct platform_device *pdev, } } - ret = icc_provider_add(provider); - if (ret) { - dev_err(dev, "error adding interconnect provider: %d\n", ret); + ret = imx_icc_register_nodes(imx_provider, nodes, nodes_count, settings); + if (ret) return ret; - } - ret = imx_icc_register_nodes(imx_provider, nodes, nodes_count, settings); + ret = icc_provider_register(provider); if (ret) - goto provider_del; + goto err_unregister_nodes; return 0; -provider_del: - icc_provider_del(provider); +err_unregister_nodes: + imx_icc_unregister_nodes(&imx_provider->provider); return ret; } EXPORT_SYMBOL_GPL(imx_icc_register); @@ -328,9 +329,8 @@ void imx_icc_unregister(struct platform_device *pdev) { struct imx_icc_provider *imx_provider = platform_get_drvdata(pdev); + icc_provider_deregister(&imx_provider->provider); imx_icc_unregister_nodes(&imx_provider->provider); - - icc_provider_del(&imx_provider->provider); } EXPORT_SYMBOL_GPL(imx_icc_unregister); |