Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <ulf.hansson@linaro.org>

+19 -1
+19 -1
drivers/pmdomain/ti/ti_sci_pm_domains.c
··· 114 114 }; 115 115 MODULE_DEVICE_TABLE(of, ti_sci_pm_domain_matches); 116 116 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 + 117 129 static int ti_sci_pm_domain_probe(struct platform_device *pdev) 118 130 { 119 131 struct device *dev = &pdev->dev; ··· 161 149 break; 162 150 163 151 if (args.args_count >= 1 && args.np == dev->of_node) { 164 - if (args.args[0] > max_id) 152 + if (args.args[0] > max_id) { 165 153 max_id = args.args[0]; 154 + } else { 155 + if (ti_sci_pm_idx_exists(pd_provider, args.args[0])) { 156 + index++; 157 + continue; 158 + } 159 + } 166 160 167 161 pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL); 168 162 if (!pd) {