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

Commit 6d7afba4 authored by Vikram Mulukutla's avatar Vikram Mulukutla
Browse files

clk: msm: clock-cpu-8996: Don't try to unmap bases in probe



We're trying to be a little too clever in the probe
function by trying to unmap the APC0/1 base if it
has already been mapped before probe. However there
is no necessity to do this; the memory mapping code
is optimized enough that it won't return a new mapping
for the same physical space. Furthermore, probe deferral
and devm_ioremap results in unmapping of the memory with
the pointers still pointing to the mapping, triggering
a warning on the next probe attempt.

Don't try to unmap the memory during probe.

Change-Id: I55b89224c155d33ffad0c0729c6e69381a83a316
Signed-off-by: default avatarVikram Mulukutla <markivx@codeaurora.org>
parent 09deb55f
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -1301,17 +1301,6 @@ static int cpu_clock_8996_driver_probe(struct platform_device *pdev)
	pwrcl_clk.hw_low_power_ctrl = true;
	perfcl_clk.hw_low_power_ctrl = true;

	/* If we mapped in APC bases for ACD, unmap them here. */
	if (vbases[APC0_BASE]) {
		iounmap(vbases[APC0_BASE]);
		vbases[APC0_BASE] = NULL;
	}

	if (vbases[APC1_BASE]) {
		iounmap(vbases[APC1_BASE]);
		vbases[APC1_BASE] = NULL;
	}

	ret = cpu_clock_8996_resources_init(pdev);
	if (ret) {
		dev_err(&pdev->dev, "resources init failed\n");