diff options
| author | David Collins <collinsd@codeaurora.org> | 2016-04-14 12:04:31 -0700 |
|---|---|---|
| committer | Jeevan Shriram <jshriram@codeaurora.org> | 2016-05-11 17:43:56 -0700 |
| commit | 6a3914c8adef8afdccde2e757e9fdf391969dfd8 (patch) | |
| tree | 877beba40253c192e65a2f992f64a2c18d52aa8e | |
| parent | 674b559b78f85d77614daa7966902349a26a109b (diff) | |
regulator: cpr3-regulator: unregister CPR IRQ affinity notifier correctly
Commit b7d5b597f16a ("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: David Collins <collinsd@codeaurora.org>
| -rw-r--r-- | drivers/regulator/cpr3-regulator.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/cpr3-regulator.c b/drivers/regulator/cpr3-regulator.c index c93b71c4bc37..931227b476ac 100644 --- a/drivers/regulator/cpr3-regulator.c +++ b/drivers/regulator/cpr3-regulator.c @@ -6040,6 +6040,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) |
