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

Commit 5e78c3d5 authored by Tao,Zhang's avatar Tao,Zhang
Browse files

coregisht: cti: Adjust the position of reading register in probe



Bring reading register forward to the function that will have a
chance to close clocks in probe function. Otherwise, it could cause
failing to read value of register.

Change-Id: Ib67f3edf23d88906d44c79d7a9f1026259a94411
Signed-off-by: default avatarTao,Zhang <taozha@codeaurora.org>
parent a80a92ab
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1556,10 +1556,10 @@ static int cti_probe(struct amba_device *adev, const struct amba_id *id)
			cpu_pm_register_notifier(&cti_cpu_pm_notifier);
		registered++;
	}
	pm_runtime_put(&adev->dev);
	ctidevid = cti_readl(drvdata, DEVID);
	drvdata->trig_num_max = (ctidevid & GENMASK(15, 8)) >> 8;
	drvdata->ch_num_max = (ctidevid & GENMASK(21, 16)) >> 16;
	pm_runtime_put(&adev->dev);
	dev_dbg(dev, "CTI initialized\n");
	return 0;
err: