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

Commit c5e42a94 authored by Matt Wagantall's avatar Matt Wagantall Committed by Stephen Boyd
Browse files

mdss: display: Correct regulator API usage



A device pointer should be passed to regulator_get() as the first
argument, and the regulator mapped to the MDSS device in the device
tree. Do this.

This also resolves the following message seen in debugfs, which
is present when regulator_get() is called with a NULL device:
<4>[ 1.145507] gdsc_mdss: Failed to create debugfs directory

Change-Id: I70a5137a31dbf82ae1e6634249f274cb16fe7a71
Signed-off-by: default avatarMatt Wagantall <mattw@codeaurora.org>
parent 8afeac2d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -405,6 +405,7 @@
		compatible = "qcom,mdss_mdp";
		reg = <0xfd900000 0x22100>;
		interrupts = <0 72 0>;
		vdd-supply = <&gdsc_mdss>;
	};

	qcom,mdss_wb_panel {
+2 −2
Original line number Diff line number Diff line
@@ -554,10 +554,10 @@ static int mdss_mdp_irq_clk_setup(struct platform_device *pdev)
	}
	disable_irq(mdss_res->irq);

	mdss_res->fs = regulator_get(NULL, "gdsc_mdss");
	mdss_res->fs = regulator_get(&pdev->dev, "vdd");
	if (IS_ERR_OR_NULL(mdss_res->fs)) {
		mdss_res->fs = NULL;
		pr_err("unable to get gdsc_mdss regulator\n");
		pr_err("unable to get gdsc regulator\n");
		goto error;
	}
	regulator_enable(mdss_res->fs);