mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
arm,arm64,drivers: reduce scope of cap_parsing_failed
Reduce the scope of cap_parsing_failed (making it static in
drivers/base/arch_topology.c) by slightly changing {arm,arm64} DT
parsing code.
For arm checking for !cap_parsing_failed before calling normalize_
cpu_capacity() is superfluous, as returning an error from parse_
cpu_capacity() (above) means cap_from _dt is set to false.
For arm64 we can simply check if raw_capacity points to something,
which is not if capacity parsing has failed.
Suggested-by: Morten Rasmussen <[email protected]>
Signed-off-by: Juri Lelli <[email protected]>
Acked-by: Russell King <[email protected]>
Acked-by: Catalin Marinas <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
2ef7a2953c
commit
c105aa3118
3 changed files with 4 additions and 8 deletions
|
|
@ -95,7 +95,7 @@ subsys_initcall(register_cpu_capacity_sysctl);
|
|||
|
||||
static u32 capacity_scale;
|
||||
static u32 *raw_capacity;
|
||||
bool cap_parsing_failed;
|
||||
static bool cap_parsing_failed;
|
||||
|
||||
void normalize_cpu_capacity(void)
|
||||
{
|
||||
|
|
@ -210,7 +210,7 @@ static int __init register_cpufreq_notifier(void)
|
|||
* until we have the necessary code to parse the cpu capacity, so
|
||||
* skip registering cpufreq notifier.
|
||||
*/
|
||||
if (!acpi_disabled || cap_parsing_failed)
|
||||
if (!acpi_disabled || !raw_capacity)
|
||||
return -EINVAL;
|
||||
|
||||
if (!alloc_cpumask_var(&cpus_to_visit, GFP_KERNEL)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue