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

Commit 2fdfe8d0 authored by Tony Truong's avatar Tony Truong
Browse files

msm: pcie: correct clock frequency allocation



When getting the size for PCIe clock frequencies
table from devicetree, use clock frequency entry
instead of clock names since these two are
not one-to-one.

Change-Id: I30fb2718c2adb2abd9536d19f439ca750b7fb1c3
Signed-off-by: default avatarTony Truong <truong@codeaurora.org>
parent bad3b74f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3343,8 +3343,8 @@ static int msm_pcie_get_resources(struct msm_pcie_dev_t *dev,

	PCIE_DBG(dev, "RC%d: entry\n", dev->rc_idx);

	cnt = of_property_count_strings((&pdev->dev)->of_node,
			"clock-names");
	cnt = of_property_count_elems_of_size((&pdev->dev)->of_node,
			"max-clock-frequency-hz", sizeof(u32));
	if (cnt > 0) {
		clkfreq = kzalloc((MSM_PCIE_MAX_CLK + MSM_PCIE_MAX_PIPE_CLK) *
					sizeof(*clkfreq), GFP_KERNEL);