Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5f4f523 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cpufreq: Register for hotplug notifier before locking hotplug"

parents 3ed5f01b d36dd773
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2333,6 +2333,9 @@ static int cpufreq_cpu_callback(struct notifier_block *nfb,
{
	unsigned int cpu = (unsigned long)hcpu;

	if (!cpufreq_driver)
		return NOTIFY_OK;

	switch (action & ~CPU_TASKS_FROZEN) {
	case CPU_ONLINE:
		cpufreq_online(cpu);
@@ -2499,6 +2502,9 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)

	pr_debug("trying to register driver %s\n", driver_data->name);

	/* Register for hotplug notifers before blocking hotplug. */
	register_hotcpu_notifier(&cpufreq_cpu_notifier);

	/* Protect against concurrent CPU online/offline. */
	get_online_cpus();

@@ -2530,7 +2536,6 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
		goto err_if_unreg;
	}

	register_hotcpu_notifier(&cpufreq_cpu_notifier);
	pr_info("driver %s up and running\n", driver_data->name);

out: