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

Commit d7b08e9f authored by David Collins's avatar David Collins
Browse files

regulator: cpr3-regulator: unregister CPR IRQ affinity notifier correctly



Commit b7d5b597 ("regulator: cpr3-regulator: add support for
configuring CPR IRQ affinity") added a call to
register_hotcpu_notifier() but did not add a call to
unregister_hotcpu_notifier().  Correct this so that the IRQ
affinity notifier is unregistered when a cpr3-regulator device
is unregistered.

Change-Id: I6379559e201f14a0fd46c1e06761fae356ec9813
CRs-Fixed: 949650
Signed-off-by: default avatarDavid Collins <collinsd@codeaurora.org>
parent b7d5b597
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -5996,6 +5996,9 @@ int cpr3_regulator_unregister(struct cpr3_controller *ctrl)
	cpr3_regulator_debugfs_ctrl_remove(ctrl);
	mutex_unlock(&cpr3_controller_list_mutex);

	if (ctrl->irq && !cpumask_empty(&ctrl->irq_affinity_mask))
		unregister_hotcpu_notifier(&ctrl->cpu_hotplug_notifier);

	if (ctrl->ctrl_type == CPR_CTRL_TYPE_CPR4)
		rc = cpr3_ctrl_clear_cpr4_config(ctrl);
		if (rc)