diff mbox

[02/10] ARM: EXYNOS: Remove calls to of_genpd_get_from_provider()

Message ID 1471340976-5379-3-git-send-email-jonathanh@nvidia.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Jon Hunter Aug. 16, 2016, 9:49 a.m. UTC
Update the EXYNOS PM domain code to use the of_genpd_add_subdomain()
and remove any calls to of_genpd_get_from_provider().

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
 drivers/soc/samsung/pm_domains.c | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

Comments

Krzysztof Kozlowski Aug. 16, 2016, 7:26 p.m. UTC | #1
On Tue, Aug 16, 2016 at 10:49:28AM +0100, Jon Hunter wrote:
> Update the EXYNOS PM domain code to use the of_genpd_add_subdomain()
> and remove any calls to of_genpd_get_from_provider().
> 
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---
>  drivers/soc/samsung/pm_domains.c | 23 ++++++++---------------
>  1 file changed, 8 insertions(+), 15 deletions(-)

Looks correct:
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

I understand this will go along with patch #1 to PM tree. There might be
some more commits around Exynos PM domain code coming soon. To avoid possible
conflicts, could you put it in a separate branch with patch #1 so a
stable tag could be easily created? I don't see direct necessity now but
it might be needed quite soon.

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Ulf Hansson Sept. 8, 2016, 11:35 a.m. UTC | #2
On 16 August 2016 at 11:49, Jon Hunter <jonathanh@nvidia.com> wrote:
> Update the EXYNOS PM domain code to use the of_genpd_add_subdomain()
> and remove any calls to of_genpd_get_from_provider().
>
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>

Acked-by: Ulf Hansson <ulf.hansson@linaro.org>

Kind regards
Uffe

> ---
>  drivers/soc/samsung/pm_domains.c | 23 ++++++++---------------
>  1 file changed, 8 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/soc/samsung/pm_domains.c b/drivers/soc/samsung/pm_domains.c
> index 4822346aadc6..7112004b8032 100644
> --- a/drivers/soc/samsung/pm_domains.c
> +++ b/drivers/soc/samsung/pm_domains.c
> @@ -215,29 +215,22 @@ no_clk:
>
>         /* Assign the child power domains to their parents */
>         for_each_matching_node(np, exynos_pm_domain_of_match) {
> -               struct generic_pm_domain *child_domain, *parent_domain;
> -               struct of_phandle_args args;
> +               struct of_phandle_args child, parent;
>
> -               args.np = np;
> -               args.args_count = 0;
> -               child_domain = of_genpd_get_from_provider(&args);
> -               if (IS_ERR(child_domain))
> -                       continue;
> +               child.np = np;
> +               child.args_count = 0;
>
>                 if (of_parse_phandle_with_args(np, "power-domains",
> -                                        "#power-domain-cells", 0, &args) != 0)
> -                       continue;
> -
> -               parent_domain = of_genpd_get_from_provider(&args);
> -               if (IS_ERR(parent_domain))
> +                                              "#power-domain-cells", 0,
> +                                              &parent) != 0)
>                         continue;
>
> -               if (pm_genpd_add_subdomain(parent_domain, child_domain))
> +               if (of_genpd_add_subdomain(&parent, &child))
>                         pr_warn("%s failed to add subdomain: %s\n",
> -                               parent_domain->name, child_domain->name);
> +                               parent.np->name, child.np->name);
>                 else
>                         pr_info("%s has as child subdomain: %s.\n",
> -                               parent_domain->name, child_domain->name);
> +                               parent.np->name, child.np->name);
>         }
>
>         return 0;
> --
> 2.1.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/soc/samsung/pm_domains.c b/drivers/soc/samsung/pm_domains.c
index 4822346aadc6..7112004b8032 100644
--- a/drivers/soc/samsung/pm_domains.c
+++ b/drivers/soc/samsung/pm_domains.c
@@ -215,29 +215,22 @@  no_clk:
 
 	/* Assign the child power domains to their parents */
 	for_each_matching_node(np, exynos_pm_domain_of_match) {
-		struct generic_pm_domain *child_domain, *parent_domain;
-		struct of_phandle_args args;
+		struct of_phandle_args child, parent;
 
-		args.np = np;
-		args.args_count = 0;
-		child_domain = of_genpd_get_from_provider(&args);
-		if (IS_ERR(child_domain))
-			continue;
+		child.np = np;
+		child.args_count = 0;
 
 		if (of_parse_phandle_with_args(np, "power-domains",
-					 "#power-domain-cells", 0, &args) != 0)
-			continue;
-
-		parent_domain = of_genpd_get_from_provider(&args);
-		if (IS_ERR(parent_domain))
+					       "#power-domain-cells", 0,
+					       &parent) != 0)
 			continue;
 
-		if (pm_genpd_add_subdomain(parent_domain, child_domain))
+		if (of_genpd_add_subdomain(&parent, &child))
 			pr_warn("%s failed to add subdomain: %s\n",
-				parent_domain->name, child_domain->name);
+				parent.np->name, child.np->name);
 		else
 			pr_info("%s has as child subdomain: %s.\n",
-				parent_domain->name, child_domain->name);
+				parent.np->name, child.np->name);
 	}
 
 	return 0;