]> git.hungrycats.org Git - linux/commit
cpufreq: Generalize of_perf_domain_get_sharing_cpumask phandle format
authorHector Martin <marcan@marcan.st>
Mon, 24 Oct 2022 04:39:23 +0000 (13:39 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Nov 2024 15:26:39 +0000 (16:26 +0100)
commit380bcd5aa80fa1507adb774b7d139f927286d553
treef28feab437d1607a5c1149ae07782186c2a9700b
parent7c15117f9468c7395ce3fd0892a6f909b91d9005
cpufreq: Generalize of_perf_domain_get_sharing_cpumask phandle format

[ Upstream commit d182dc6de93225cd853de4db68a1a77501bedb6e ]

of_perf_domain_get_sharing_cpumask currently assumes a 1-argument
phandle format, and directly returns the argument. Generalize this to
return the full of_phandle_args, so it can be used by drivers which use
other phandle styles (e.g. separate nodes). This also requires changing
the CPU sharing match to compare the full args structure.

Also, make sure to of_node_put(args.np) (the original code was leaking a
reference).

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Stable-dep-of: c0f02536fffb ("cpufreq: Avoid a bad reference count on CPU node")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cpufreq/mediatek-cpufreq-hw.c
include/linux/cpufreq.h