Skip to content

Commit d88ea30

Browse files
committed
pmdomain: Merge branch fixes into next
Merge the pmdomain fixes for v6.9-rc[n] into the next branch, to allow them to get tested together with the new changes that are targeted for v6.10. Signed-off-by: Ulf Hansson <[email protected]>
2 parents 0cebf7c + 670c900 commit d88ea30

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

drivers/pmdomain/ti/ti_sci_pm_domains.c

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,18 @@ static const struct of_device_id ti_sci_pm_domain_matches[] = {
114114
};
115115
MODULE_DEVICE_TABLE(of, ti_sci_pm_domain_matches);
116116

117+
static bool ti_sci_pm_idx_exists(struct ti_sci_genpd_provider *pd_provider, u32 idx)
118+
{
119+
struct ti_sci_pm_domain *pd;
120+
121+
list_for_each_entry(pd, &pd_provider->pd_list, node) {
122+
if (pd->idx == idx)
123+
return true;
124+
}
125+
126+
return false;
127+
}
128+
117129
static int ti_sci_pm_domain_probe(struct platform_device *pdev)
118130
{
119131
struct device *dev = &pdev->dev;
@@ -149,8 +161,14 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
149161
break;
150162

151163
if (args.args_count >= 1 && args.np == dev->of_node) {
152-
if (args.args[0] > max_id)
164+
if (args.args[0] > max_id) {
153165
max_id = args.args[0];
166+
} else {
167+
if (ti_sci_pm_idx_exists(pd_provider, args.args[0])) {
168+
index++;
169+
continue;
170+
}
171+
}
154172

155173
pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
156174
if (!pd) {

0 commit comments

Comments
 (0)