MLK-14301: Revert "MLK-11343-01 cpufreq: imx: replace clk_get & regulator_get will...
authorLeonard Crestez <leonard.crestez@nxp.com>
Fri, 3 Mar 2017 17:09:04 +0000 (19:09 +0200)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:10:49 +0000 (15:10 -0500)
commitaba70898283286add27c7e6388abb61777734e2f
treef66e7444372f6924325221d1ac60af29a67801bd
parent83950e16573ea0ebca0427c9a7d13d1ea91a6cc9
MLK-14301: Revert "MLK-11343-01 cpufreq: imx: replace clk_get & regulator_get will devm ones"

Upstream rejected this patch because it is wrong: Attaching clk and
regulator resources to the cpu device results in them never actually
getting freed.

This is relevant now that we rely on supporting EPROBE_DEFER because we
must handle correctly returning from a partial probe.

In particular this patch fixes imx6qp-sabresd not setting the PU
regulator to bypass mode because the cpufreq driver fetched the
regulator before gpc and leaked it.

This is not a straight revert because other clks and regulators were
added, we add code to free them too.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
drivers/cpufreq/imx6q-cpufreq.c