[PATCH 06/19] pmdomain: drop superfluous parameter to __genpd_dev_pm_attach

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The Linux prototype of __genpd_dev_pm_attach has the base device as
second argument and retrieves the of_node pointer via the device in the
first argument. As the function isn't exported, we don't have to follow
the Linux API, but we also don't need to keep arguments we don't use,
thus drop the device pointer.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 drivers/base/power.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/base/power.c b/drivers/base/power.c
index cfee5e793037..daec443a7000 100644
--- a/drivers/base/power.c
+++ b/drivers/base/power.c
@@ -306,7 +306,7 @@ void genpd_activate(void)
 	have_genpd_providers = true;
 }
 
-static int __genpd_dev_pm_attach(struct device *dev, struct device_node *np,
+static int __genpd_dev_pm_attach(struct device *dev,
 				 unsigned int index, bool power_on)
 {
 	struct of_phandle_args pd_args;
@@ -316,7 +316,7 @@ static int __genpd_dev_pm_attach(struct device *dev, struct device_node *np,
 	if (!have_genpd_providers)
 		return 0;
 
-	ret = of_parse_phandle_with_args(np, "power-domains",
+	ret = of_parse_phandle_with_args(dev->of_node, "power-domains",
 				"#power-domain-cells", index, &pd_args);
 	if (ret < 0)
 		return ret;
@@ -372,7 +372,7 @@ int genpd_dev_pm_attach(struct device *dev)
 				       "#power-domain-cells") != 1)
 		return 0;
 
-	return __genpd_dev_pm_attach(dev, dev->of_node, 0, true);
+	return __genpd_dev_pm_attach(dev, 0, true);
 }
 EXPORT_SYMBOL_GPL(genpd_dev_pm_attach);
 
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux