summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-01-19 17:25:57 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-01-22 11:12:02 +0100
commit7b23b9c96a598633dc18bbf7a03d629bf830449e (patch)
treeb2a21f4de720f4750fd0f27d207832bedf674eef
parente5f38c818448a8a574005a6614ce15e487190d8f (diff)
downloadbarebox-7b23b9c96a59.tar.gz
barebox-7b23b9c96a59.tar.xz
pmdomain: drop superfluous parameter to __genpd_dev_pm_attach
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@pengutronix.de> Link: https://lore.barebox.org/20240119162610.1014870-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/base/power.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/base/power.c b/drivers/base/power.c
index cfee5e7930..daec443a70 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);